Method and apparatus for memory read-refresh, scrubbing and variable-rate refresh

ABSTRACT

A memory controller and method that provide a read-refresh (also called “distributed-refresh”) mode of operation, in which every row of memory is read within the refresh-rate requirements of the memory parts, with data from different columns within the rows being read on subsequent read-refresh cycles until all rows for each and every column address have been read, scrubbing errors if found, thus providing a scrubbing function that is integrated into the read-refresh operation, rather than being an independent operation. For scrubbing, an atomic read-correct-write operation is scheduled. A variable-priority, variable-timing refresh interval is described. An integrated card self-tester and/or card reciprocal-tester is described. A memory bit-swapping-within-address-range circuit, and a method and apparatus for bit swapping on the fly and testing are described.

RELATED APPLICATIONS

This is a divisional of

U.S. patent application Ser. No. 11/558,450 entitled “APPARATUS ANDMETHOD FOR MEMORY READ-REFRESH, SCRUBBING AND VARIABLE-RATE REFRESH”filed on Nov. 10, 2006 (which issued as U.S. Pat. No. 8,024,638 on Sep.20, 2011), which is a divisional of U.S. patent application Ser. No.10/850,057 entitled “APPARATUS AND METHOD FOR MEMORY WITH BIT SWAPPINGON THE FLY AND TESTING” filed on May 19, 2004 (which issued as U.S. Pat.No. 7,320,100 on Jan. 15, 2008), which claims benefit of U.S.Provisional Patent Application No. 60/472,174 filed on May 20, 2003,titled “APPARATUS AND METHOD FOR TESTING MEMORY CARDS,” each of which ishereby incorporated by reference in its entirety. This application isalso related toU.S. patent application Ser. No. 10/850,044 titled “APPARATUS AND METHODFOR TESTING MEMORY CARDS” filed May 19, 2004 (which issued as U.S. Pat.No. 7,184,916 on Feb. 27, 2007),U.S. patent application Ser. No. 11/558,452 titled “APPARATUS AND METHODFOR MEMORY ASYNCHRONOUS ATOMIC READ-CORRECT-WRITE OPERATION” filed onNov. 10, 2006 (which issued as U.S. Pat. No. 7,676,728 on Mar. 9, 2010),andU.S. patent application Ser. No. 11/558,454 titled “APPARATUS AND METHODFOR MEMORY BIT-SWAPPING-WITHIN-ADDRESS-RANGE CIRCUIT” filed on Nov. 10,2006 (which issued as U.S. Pat. No. 7,565,593 on Jul. 21, 2009), each ofwhich is incorporated herein in its entirety by reference.

FIELD OF THE INVENTION

This invention relates to the field of computer memories, and morespecifically to a method and apparatus for enhancing performance,reliability and availability in a computer memory by providing, in eachword in memory, one or more spare bits and a circuit that can switch thespare bits in specified sections of memory dynamically (in real time)while the system is running and using data from the section beingswitched, and to circuitry that allows functions of the card to betested from the same card or from another memory card that is connectedthrough a test apparatus. The apparatus and method allow selecting fromamong a plurality of ways to perform memory refresh in DRAM memoriesaccording to which way is more efficient, providing variable timing foreach cycle of refresh, and performing memory scrubbing which removestransient errors from the memory being controlled. An atomicread-correct-write can be scheduled to go back and fix a memory locationafter an error is detected in data, where the data was earlier correctedand sent to a processor.

BACKGROUND OF THE INVENTION

Controllers for DRAMs (dynamic random-access memories) have been gettingmore complex over time as the data rates to memory have been increasing,but also as the features built into the memory parts have become moreelaborate. For example, having multiple memory banks in the memory parts(chips) adds significantly to the design complexity of a controller thatattempts to use the capability of such memory parts to better advantage.

Over time and as a result of multiple causes, computer memories willhave data errors. Only purchasers of inexpensive PCs tolerate theinconvenience of memories that do not have ECC (error-correction code)circuitry. One common ECC type is an SECDED (single-error correct,double-error detect) ECC. There are numerous different well-known codesthat can be used to achieve such a function.

As the density of memory chips keeps increasing, the individual memorybits become more sensitive to upset and therefore to data loss. Datafailures that do not result in (or result from) permanent IC failures,such that the memory part still functions correctly, are called softerrors. These soft errors can be caused by familiar mechanisms likealpha particles but also, increasingly, by other mechanisms like otherheavy ions and power-supply noise. The sensitivity to data lossincreases geometrically as process rules shrink and power-supplyvoltages are reduced, while the total number of bits per processor alsoincreases geometrically because of user memory-size requirements. Thismeans that soft-error rates for systems coming on line will increase byorders of magnitude over historic error-rate norms.

In the past, soft memory errors have generally been handled byerror-correction codes: SECDED and the like. Other correctiontechnologies exist, and are sometimes used, but become increasinglyexpensive as a fraction of total memory cost as the correction andrecovery capability is improved. For example, U.S. Pat. No. 5,745,508“ERROR-DETECTION CODE” by Thomas Prohofsky, which is incorporated hereinby reference, discusses SECDED codes that also detect certain three-bitand four-bit errors; and U.S. Pat. No. 4,319,357 “DOUBLE ERRORCORRECTION USING SINGLE ERROR CORRECTING CODE” by Bossen, which isincorporated herein by reference, discusses correcting certain hard-softdouble-error combinations.

U.S. patent application Ser. No. 09/407,428 filed Sep. 29, 1999 andentitled “MULTIPROCESSOR NODE CONTROLLER CIRCUIT AND METHOD” by Deneroffet al. describes a system that can use ECC memory.

All DRAM parts need to be refreshed; that is what the D (dynamic) in theDRAM name indicates: one must cycle the memory repeatedly in order thatthe dynamic contents (the stored charges) of the capacitive store ofeach memory bit are regenerated. This “refresh” function is typicallymanaged by having the memory parts themselves perform the refreshoperation. This function generally takes place after a specific commandis sent from the local memory controller using a specific request rateso that all memory bits are referenced within the required refreshinterval.

Some features that have been in some controllers in the past and whoserecognized benefits indicate that they are likely to be used in newdesigns are memory refresh, memory scrubbing, and support for spare bitsin memory. Conventional uses for a spare bit include the ability tologically rewire a card that has a stuck bit (a bit that is always zeroor one) or a frequently failing signal on a pin of a memory part suchthat the card can be returned to correct operation without physicalaccess to the failing pin, chip, or card. In the past, such rewiringtypically required removing the card from the system. Logic circuitsthat provide rudimentary versions of these features with the card inplace in a system have shortcomings, such as having to stop accessesfrom the processor, at least as regards a section of memory having afailed bit and perhaps entirely, in order to reconfigure the memory cardto have the spare bit to replace the failed bit.

Electrical issues and pin limitations push memory system design indirections that put the memory controller(s) on the memory cards andalso push the card interface to have higher data rates per pin in orderto reduce the number of pins while keeping the card bandwidth in linewith the higher performance needs of the attached processors and of thebandwidth of the memory components on the memory cards. A memory carddesign that adopts this direction has test issues, in that the memorycomponents (the chips) are not directly accessible for testing as isnormal in past industry practice, and the data rates of the high-speedinterfaces are too fast for connection to testers that are available innormal production testing. While special-purpose test equipment can bebuilt and used, the design of special-purpose memory testers is veryexpensive and time consuming.

Thus, there is a need for improved methods and circuits in memorysubsystems and for logic functions in which memory performance,reliability (the time between system failures, or the inverse of failurefrequency) and availability (the percentage of time the system is up andworking) are improved.

SUMMARY OF THE INVENTION

Some embodiments of the invention provide a memory daughter card (MDC)for a computer system that uses one or more MDCs, wherein each MDCincludes, in some embodiments, a W-circuit and a plurality of memoryparts or chips. The W-circuit provides a large variety of complexfunctions that support and enhance the function of the MDC, such astest, refresh, bit-swap, high-speed serial interface, command and accessbuffering, error-correction-code generation, checking and corrections,address-range checking, and/or command interleaving functions etc.

In some embodiments, each memory controller can swap a spare bit intooperation in a section of memory, dynamically in the background (i.e.,in some embodiments, the swap is performed as part of the regularread-refresh operations, performed in the background during and whilenormal processor operations proceed in the foreground), while keepingthe data in its normally addressed locations and even allowingfunctional processing to continue to the affected memory locationsduring the swap operation. One at a time, each word in the affectedportion of memory is read using the normal bit mapping, corrected ifnecessary, and then written to the same address but using thebit-swapped mapping. Some embodiments use pointers that define the startaddress and end address of the bit-swapped portion of memory, such thatregular processor read operations and write operations use thebit-swapped mapping for the portion that has been swapped, and use thenormal bit mapping for the portion that has not been swapped. Thisallows the bit swapping operations and regular processor read operationsand write operations to be performed at the same time (though individualoperations are interleaved).

Some embodiments also allow spare-bit positions to be moved; for examplea memory configured with bit-3, say, as the position of the spare couldbe reconfigured so that bit-11 (or any other bit in the data path)becomes the spare-bit, all while system operation is ongoing. Thus, thespare bit or bits can be configured to start out in any bit position orbit positions in the memory data path, and can be moved to any otherposition(s) during system operation.

Another aspect of the invention, in some embodiments, includes abit-shifting circuit that allows bit replacement, i.e., allows any databit, SECDED ECC bit, or other data-bit position to be disconnected orignored, and effectively replaced using a spare bit. In someembodiments, an address-range detection circuit is coupled to thebit-shifting circuit, wherein one or both of the address endpoints ofthe range are changed as the data is read out of the old bit positions,corrected if necessary, and then written back into the new bitpositions. Normal read and write operations also use the address-rangedetection circuit such that operations within the bit-replaced addressrange use the bit-shifted configuration, and operations not within thebit-replaced address range use the normal bit configuration. The presentinvention provides a memory daughter card (MDC) having one or more(likely multiple) very high-speed serial interface(s), optionally anon-card L3 cache, and an on-card MDC test engine (or equivalently, aW-circuit test engine) that allows one MDC to be directly connected toanother MDC, or to itself, for testing purposes. In some embodiments, acontrol interface, such as a JTAG interface and/or an IEEE-1394-typechannel, allows the test engine to be programmed and controlled by atest controller on a test fixture that allows a single card to betested, or simultaneous testing of one or more pairs of MDCs, one MDC ina pair (the “golden” MDC) testing the other MDC of that pair.

Some embodiments of the invention provide a memory daughter card havinga memory controller that provides a read-refresh (also called“distributed-refresh”) mode of operation, in which every row of memoryis read within the refresh-rate requirements of the memory parts, withdata from different columns within the rows being read on subsequentread-refresh cycles until all rows for each and every column addresshave been read, at which point the process begins anew, thus readingevery location in memory at a regular interval. While some previouscontroller implementations provided a refresh function using readcommands (i.e., sending both row addresses and column addresses toaccess and cycle through all the memory rows), the column address was a“don't care” value, thus ignoring which memory column is was selected inorder to simplify their refresh function. In contrast, some embodimentsof the present invention cycle through all the row addresses at a ratesufficient to refresh the memory parts at a given column (and actuallyreading the data and checking it), but these embodiments of the presentinvention also cycle through all the column addresses for the refreshcommands, check the ECC for each word of data read, and correct anyerrors that are found, thus providing a scrubbing function that isintegrated into the read-refresh operation, rather than being anindependent operation. This satisfies the refresh-rate requirement toread every row within the specified row-refresh interval, and alsochanges columns on each successive row-refresh interval, which is notrequired to provide the refresh function, but is provided in order toread and check the ECC on every location during this type of refresh.

In some embodiments, a scrubbing function is also provided (based on thechecked ECC data) and is integrated into the read-refresh operationrather than being an independent operation. For scrubbing, in someembodiments, a subsequent atomic read-correct-write operation isscheduled based on each correctable single-bit error detected during theread-refresh operations (the separate read is done just in case theprocessor had modified the contents after the error was detected butbefore corrected data could have been written back, thus the read datafrom the request from which the error was detected, is not used for thewrite back of corrected data, but instead a new read is done as part ofan atomic instruction) to correct the affected location. If no error wasdetected, then no scrubbing is needed. Other embodiments can selectivelyhalt subsequent references to the memory bank whose data word is beingscrubbed until the corrected data is returned to the memory part or itis determined that there was no error so that no write operation needtake place.

In some embodiments, if a single-bit error is detected in a normal readoperation from the processor, the error is fixed in the memory card andthe corrected data are sent to the processor, and a supplemental atomicread-correct-write sequence is scheduled (as above, just in case theoriginal processor or another processor had quickly modified thecontents after the error was detected).

In some embodiments, a scrubbing function is provided in addition to anexplicit-refresh (also called AutoRefresh) (i.e., scrubbing isinterleaved with), such that all row addresses and all column addresseswithin each row are periodically read (e.g., about once per hour, insome embodiments, but in addition to and interspersed with theAutoRefresh, rather than instead of the AutoRefresh), and a correctionsent if an error is detected. That is, is these embodiments, AutoRefreshis left on all the time, with the scrubbing function also running but inthe background, for those cases where AutoRefresh uses less memorybandwidth than distributed refresh. In other embodiments, AutoRefreshmode of operation is alternatively selected instead of the read-refreshmode of operation to improve performance. That is, in some of theseembodiments, AutoRefresh is run for about an hour, the read-refresh isrun instead to scrub memory once and perform refresh while scrubbing,and then AutoRefresh is again turned on.

In some embodiments, if using the read-refresh (distributed-refresh)mode of operation so that scrubbing and/or the spare-bit capability areall used as needed within the refresh function, the refresh rate (andtherefore the rate of the scrubbing and spare-bit functions) is set bythe refresh requirements of the memory being controlled. In someembodiments, when the AutoRefresh function is instead being used forrefresh, then the refresh frequency becomes fixed (e.g., a refreshrequest every 7.8 microseconds for certain parts including certain DDR2(Double Data Rate 2, a JEDEC memory standard for DRAM memory parts)),and the rates at which scrubbing and spare-bit insertion are done areset separately and independently from the refresh rate, generally at amuch slower rate. In some embodiments, when doing AutoRefresh andscrubbing only, the scrub rate is set slow (e.g., at a rate to scrubmemory once every few hours); and if doing AutoRefresh, scrubbing andspare-bit insertion, the read-refresh (distributed-refresh) rate wouldbe set to be fairly fast (in some embodiments, e.g., up to a rate thatwould take about 10% or less of the memory bandwidth).

Some embodiments further provide one or more very-high-speed serialinterfaces to the processor, and optionally an on-card L3 cache.

A method is also described, wherein one MDC executes a series of readsand writes (and optionally other commands) to another MDC to test atleast some of the (and ideally, most or all of) other card's functions.A method is also described, wherein one port of an MDC executes a seriesof reads and writes (and optionally other commands) to another port ofthe same MDC to test at least some of the (and ideally, most or all of)the card's functions.

It is to be understood that a memory “card” or “daughter card” includesany suitable packaging, including printed circuit card, ceramic module,or any other packaging that holds a plurality of memory chips along withsome or all of the circuitry described herein. In some embodiments, a“card” would include a single integrated-circuit chip having both thememory and some or all of the circuitry described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagram of a computer system 100 of some embodimentsof the invention.

FIG. 1B is a block diagram of a different view of computer system 100 ofsome embodiments of the invention.

FIG. 2A is a block diagram of a memory-card testing system 200 of someembodiments of the invention.

FIG. 2B is a block diagram of a memory-card testing system 201 of someembodiments of the invention.

FIG. 2C is a block diagram of a memory-card testing system 202 of someembodiments of the invention.

FIG. 2D is a block diagram of a memory-card testing system 203 of someembodiments of the invention.

FIG. 2E is a block diagram of a portion of W-circuit 120 of someembodiments of the invention.

FIG. 2F is a block diagram of a test-engine processor 346 of someembodiments of the invention.

FIG. 2G is a block diagram of a test-engine test-result checker 347 ofsome embodiments of the invention.

FIG. 3 is a block diagram of a computer system (node) 101 of someembodiments of the invention.

FIG. 4A is a block diagram of a non-activated bit-swapping circuit 400of some embodiments of the invention.

FIG. 4B is a block diagram of an activated bit-swapping circuit 401 ofsome embodiments of the invention.

FIG. 5 is a block diagram of a multiple-bit-swapping circuit 500 of someembodiments of the invention.

FIG. 6 is a block diagram of an address-range bit-swapping circuit 600of some embodiments of the invention.

FIG. 7 is a flowchart block diagram of refresh/scrubbing/bit-swappingprocess 700 of some embodiments of the invention.

FIG. 8 is a schematic flowchart 800 used in some embodiments.

FIG. 9 is a schematic flowchart 900 used in some embodiments.

FIG. 10 is a schematic flowchart 1000 used in some embodiments.

DESCRIPTION OF PREFERRED EMBODIMENTS

In the following detailed description of the preferred embodiments,reference is made to the accompanying drawings that form a part hereof,and in which are shown by way of illustration specific embodiments inwhich the invention may be practiced. It is understood that otherembodiments may be utilized and structural changes may be made withoutdeparting from the scope of the present invention.

The leading digit(s) of reference numbers appearing in the Figuresgenerally correspond to the Figure number in which that component isfirst introduced, such that the same reference number is used throughoutto refer to an identical component which appears in multiple Figures.Signals and connections may be referred to by the same reference numberor label, and the actual meaning will be clear from its use in thecontext of the description.

System Environment

FIG. 1A is a block diagram of a computer system 100 of some embodimentsof the invention. Computer system 100 includes an interconnectionnetwork 99 that is connected to one or more boards 102, each boardhaving one or more nodes 101 (for example one or two nodes 101 per board102), each node 101 having one or more PEs (processing elements, alsocalled processor units, or processors) 106 (for example, four processingelements 106 are used in some embodiments), each node 101 having one ormore memory daughter cards (MDCs) 110 (for example, up to thirty-twoMDCs 110 per node 101, in some embodiments). In some embodiments, a nodecontroller, router, and interconnection scheme such as described in U.S.patent application Ser. No. 09/407,428 filed Sep. 29, 1999 and entitled“MULTIPROCESSOR NODE CONTROLLER CIRCUIT AND METHOD” is used with node101. In some embodiments, each PE 106 has six connections to network 99(e.g., a multi-dimensional network, two each in each of threedirections, and which, for example, can be used to form a torus(optionally multidimensional) interconnection), while in otherembodiments, other numbers of connections are made to constructdifferent network topologies. In typical systems, a power supply system181 supplies power, and an input/output system 182 provides data inputand output, such as to and from disk and/or tape storage devices, and/oruser consoles.

FIG. 1B is in further explanation of the embodiment of computer system100. Computer system 100 includes an interconnection network 99 that isconnected to a plurality of nodes 101, each node 101 having a processorgroup 105 having one or more processing elements 106 (for example, fourprocessing elements are used in some embodiments), each node 101 havingone or more memory daughter cards (MDCs) 110 (for example, up tothirty-two MDCs 110 per node 101, in some embodiments). In someembodiments, all of the MDCs 110 of a node are each connected to all ofthe processors 106 of that node (e.g., in some embodiments, each of thefour ports (e.g., SERDES interfaces) 121 of each MDC 110 is connected toa different one of the plurality of processors 106).

In some embodiments, each MDC 110 includes a single W-chip or W-circuit120 (i.e., a circuit 120, which, in some embodiments, is implemented ona single chip (and, in some embodiments, includes other circuitry and/orfunctions than described herein), but in other embodiments, can beimplemented on multiple chips, or a processor, or on a memory chip orusing other configurations), but in other embodiments, circuit 120 isimplemented using more than one chip, but is designated herein as W-chipor circuit 120) having a high-speed external card interface 112, whichin turn includes a plurality of SerDes (serializer-deserializer) ports121 (for example, four SerDes ports 121 per MDC 110 are used in someembodiments). A crossbar switch 123 connects each SerDes port 121 toeach one of a plurality of L3 caches 124 (for example, four L3 caches124 per MDC 110 are provided in some embodiments). In some embodiments,each L3 cache 124 is tied by connection 126 to a corresponding DDR2memory controller 127. In some embodiments, an additional “degradecapability” connection 128 is provided between each L3 cache 124 and aneighboring DDR2 memory controller 127. In some embodiments, each DDR2memory controller 127 controls five eight-bit-wide DDR2 memory-chipgroups 130 (for example, each chip group 130 having one memory chip, orhaving two or more stacked chips). This provides each DDR2 memorycontroller 127 with a forty-bit-wide data path, providing 32 data bits,seven ECC (error-correction code) bits, and a spare bit.

In some embodiments, the individual memory components of the memory-chipgroup(s) 130 conform to the emerging JEDEC Standards Committee DDR2SDRAM Data Sheet Revision 1.0 Specification JC 42.3 (JESD79-2 Revision1.0) dated Feb. 3, 2003 or subsequent versions thereof. In otherembodiments, conventional, readily available DDR chips are used. In yetother embodiments, any suitable memory-chip technology (such as Rambus™,SDRAM, SRAM, EEPROM, Flash memory, etc.) is used for memory-chip groups130.

In some embodiments, each DDR2 memory controller 127 controls fiveeight-bit-wide DDR2 memory-chip groups 130 (for example, each chip group130 having one memory rank, or having two or more ranks with possiblystacked memory chips). This provides each DDR2 memory controller 127with a forty-bit-wide data path, providing 32 data bits, seven ECC(error-correction code) bits, and a spare bit.

The W-circuit 120 also includes a control interface 122 (someembodiments use a JTAG-type boundary-scan circuit for control interface122; some other embodiments use a Firewire (IEEE Standard 1394) channel(or other standard or custom interface channel) for the off-cardinterface 119 to control interface circuit 122). In some embodiments,the Firewire interface is built into W-circuit 120, while in otherembodiments, the Firewire interface is built on a separate chip on MDC110, and connects to a JTAG interface provided by control interface 122.Control interface 122 provides the mechanism to set bit patterns inconfiguration registers (for example, some embodiments use memory-mappedregisters (MMRs) 141) that hold variables that control the operation ofW-circuit 120.

The present invention also provides circuitry that allows one MDC 110 totest another MDC 110, in some embodiments, or to test itself, in otherembodiments. In some embodiments, this circuitry is implemented as aW-circuit test engine (WTE) 125 having a microcode sequence, describedfurther below.

FIG. 2A is a block diagram of a memory-daughter-card testing system 200of some embodiments of the invention. In some embodiments, MDC testingsystem 200 includes a test fixture 210 having two or more MDCs 110plugged into it. Connections 230 couple each output of each SerDes port121 to a corresponding input of a SerDes port 121 on another MDC 110,thus allowing the test to run each MDC 110 at full speed through itsnormal read/write interface. The test fixture 210 provides clocks 222from clock generator 240 (e.g., high-speed differential clocks) used bythe MDCs 110, and also includes a test controller 220 that programs oneor the other or both WTEs 125 (e.g., through its ports 219A and 219Bcoupled to the respective ports 119 to control interfaces 122). In someembodiments, test controller 220 sets up one MDC 110 (for example, thelower one) as the tester card wherein its WTE 125 runs the memory tests,and sets up the other MDC 110 (for example, the upper one) as theunit-under-test (UUT) wherein it is configured in the normal read/writememory card mode (as if it were in system 100 of FIG. 1A). Thus, thelower WTE 125 sets up data patterns in its memory-chip groups 130 (atthe bottom of FIG. 2A), and then controls the writing of these patternsout the SerDes port 121 of the lower MDC 110, and thus into the SerDesof the upper MDC 110, and into that MDC's caches 124 and memory-chipgroups 130. These data patterns are then read back the opposite way (or,in some embodiments, the UUT itself checks read operands from the memorybeing tested), and compared by WTE 125 in the lower MDC 110. When eachtest is complete, the results are transferred back to test controller220 for analysis and use in accepting, rejecting, or reconfiguring theUUT MDC 110.

In some embodiments, such a configuration allows a large variety ofdebug activities to be performed that are not available on simplersetups that run a large number of tests, but generate only a pass-failresult, such as checking a checksum value after a large number of testswere run. The ability to load microcode having newly devised testsallows intricate debug to be performed, even when the high-speedinterfaces (SerDes ports 121, for example) are run at full speed.

FIG. 2B is a block diagram of a memory-daughter-card testing system 201of some embodiments of the invention. In some embodiments, MDC testingsystem 201 includes a test fixture 211 having a single MDC 110 pluggedinto it. Connections 231 couple each output of a subset of SerDes ports121 to a corresponding input of another SerDes port 121 on the same MDC110, and the test controller's control port 219 is connected to theMDC's port 119 of control interface 122, thus allowing the test to runthe MDC 110 at full speed through its normal read/write interface.

In some embodiments, the test fixture 211 (which is similar to fixture210 of FIG. 2A, except that loop-back connections are made in the testfixture 211 between ports 0 and 1, and ports 2 and 3 of MDC 110)provides clocks 222 (e.g., high-speed differential clocks) used by theMDCs 110, and also includes a test controller 220 that programs thesingle WTE 125. In other embodiments, one or both MDCs 110 generates itsown clocks for its transmitter, which clocks are then received and usedby the other MDC 110.

In some embodiments, test controller 220 sets up one or more SerDesports 121 (for example, port 0 and port 2) as the tester port(s) whereinWTE 125 runs the memory tests out those ports and receives results backinto those ports), and sets up the other ports 121 (for example, ports 1and 3) as the unit-under-test (UUT) ports wherein they are configured inthe normal read/write memory card mode (as if it were in system 100 ofFIG. 1A). Thus, in some embodiments, the even-numbered ports set up datapatterns in their respective memory-chip groups 130, and then controlsthe writing of these patterns out the even-numbered SerDes port 121, andthus into the odd-numbered SerDes port 121 next to them, and into thoseport's caches 124 and memory-chip groups 130. These data patterns arethen read back the opposite way and compared by WTE 125. When each testis complete, the results are transferred back to test controller 220 foranalysis and use in accepting, rejecting, or reconfiguring the UUT MDC110. This way of testing allows the tests to cover the complete datapath from the memories to the edge of the card. Further, only the singleMDC 110 is required for the test.

In some embodiments, a test-control computer 288 is provided to drivetest controller 220, and to receive results for display, transmission,or storage. In some embodiments, a computer-readable storage medium 289(such as diskette, CDROM, or even an internet connection) is used toprovide the control program data that is loaded into microcode memory310 of FIG. 2F, described below. This control program data provides thedata and control flow to allow, e.g., one MDC 110 to test another MDC110. In some embodiments, an external master clock oscillator 287provides a source signal for clock generator 240.

In other embodiments, a computer-readable storage medium 289 is providedthat includes instructions stored thereon for causing a suitablyprogrammed information-processing system to execute one or more of themethods described herein.

FIG. 2C is a block diagram of a memory-daughter-card testing system 202of some embodiments of the invention. In some embodiments, MDC testingsystem 202 includes a test fixture 212 (which is similar to fixture 211of FIG. 2B, except no electrical connections are made in the testfixture 211 to ports 0, 1, 2 and 3 of MDC 110) having a single MDC 110plugged into it. Connections (in some embodiments, these areprogrammably connectable by microcoding WTE 125) are configured on boardthe MDC 110, rather than in the test fixture as was the case for FIGS.2B and 2A. In other embodiments, the connections are physically wired(e.g., by card traces, jumpers or soldered “blue wires” that are laterremoved or cut (for example, by a laser or other suitable method) fornormal operation of the card (thus making the test card temporarily notquite exactly identical to the normally operating card). These on-cardconnections couple each output of a subset of SerDes ports 121 to acorresponding input of another SerDes port 121 on the same MDC 110, thusallowing the test to run the MDC 110 at full speed through its normalread/write interface. Although, this does not allow the testing to thecard edge as was the case for FIG. 2B, in other ways the operation ofFIG. 2C is the same as for FIG. 2B.

FIG. 2D shows a similar system 203 having local SerDes Connections,connected by gates 221 under the control of loop-back controller 223 asdirected by WTE 125, in some embodiments, within the IC that allow localtesting of the SerDes functions before the IC is mounted on the MDC 110and afterward. The output of each port 121 is returned to the input ofthe same port within W-circuit 120. In some embodiments, no actualconnections to the high-speed serial ports need to be made to the testfixture 213. In some embodiments, MDC testing system 203's test fixture213 (which is similar to fixture 211 of FIG. 2B, except no electricalconnections are made in the test fixture 211 to ports 0, 1, 2 and 3 ofMDC 110) has one or more MDCs 110 plugged into it.

FIG. 2E is a block diagram of a portion of W-circuit 120 of someembodiments of the invention, showing more detail than is shown in FIG.1A. In some embodiments, W-circuit 120 includes a control interface 122(for example, a JTAG-type scan-register interface and associated controlregisters), a WTE 125, a crossbar 123 that connects each of four SerDesports 121 (two are shown here) to each of four L3 caches 124 (two areshown here), which are in turn coupled to a corresponding memorycontroller 127 (two of four are shown here). WTE 125 includes a testgeneration component 346 and a test results component 347 that comparesresults obtained by selection circuitry 348 that obtains results fromthe SerDes-in sections 341 or the crossbar-out sections 352. Each port121 includes a SerDes-in 341 portion that feeds a corresponding LinkControl Block-in (LCB-in) circuit 342, and a multiplexer (selector) 343that obtains data from test generator 346, and crossbar-out circuit 352and selects one of those to feed to LCB-out circuit 344 and then toSerDes-out portion 345. The crossbar-in portion 351 obtains data fromeach input port (i.e., from the output of its LCB-in 342) and directsthat data to one of the four L3 caches 124. The crossbar-out portion 352obtains data from one of the four L3 caches 124, and directs that datato one of the four output ports 121 (i.e., to the input of its LCB-out344 through its selector 343).

In some embodiments, the cache quadrants 124 each drive separate memorycontrollers 127. In turn, each memory controller drives a set of memorychips 130.

FIG. 2F is a block diagram of a test-engine processor 346 of someembodiments of the invention. Test-engine processor 346 provides testgeneration functions for WTE 125. Programming and data patterns 301 aresent from test controller 220 (see FIG. 1B) through control interface122, and delivered to microcode memory 310 and test data buffer 326.Some embodiments include a pseudo-random number generator 328 thatprovides pseudo-random numbers as source test operands to test databuffer 326 and to the expected-result-data buffer 428 (see FIG. 4)instead of loading tests from the control interface 122. Microcodememory 310 provides instructions 316 in a manner programmed into thecontrol words stored there and sequenced by sequencer 312 that includesa loop counter/controller 314, and that generates each next address 313(e.g., sequential execution, looping, branching, etc.). Instructions 316also include data, command, and selection fields to test data buffer326, address register 324 and its address adder 322, command register320, and build-test-packet controller 330. Build-test-packet controller330 in turn receives commands from command register 320, addresses fromaddress register 324, and data (i.e., patterns to be written, read, andcompared) from test data buffer 326. Build-test-packet controller 330sends test packets 331 to the crossbar-in 351, which forwards them theL3 cache 124 or the memory controllers 127 and then the memory 130 onthe tester MDC 110, and sends TIDs (Transaction IDentifiers) to theresult-data indexes buffer 422 (see FIG. 4). The test controller 125 canalso send test data to the 343 multiplexers and thence to the SerDesports 121.

FIG. 2G is a block diagram of a test-engine test-result checker (TETRC)347 of some embodiments of the invention. TETRC 347 includes anexpected-result-data buffer 428 that receives fill data 401 from JTAGcontrol interface 122 (see FIG. 1B), pseudo-random data 416 frompseudo-random number generator 328, and result data indexes 418 anaddress that is used to read expected result data items from result-dataindexes buffer 422, and sends operands for comparison operationsperformed by compare circuit 424. In other words, the TID (transactionID) is used as an address into the result data indexes buffer 422, andobtains a pointer 418 that points to an entry having the comparison datain expected result data buffer 428. Result-data indexes buffer 422receives TIDs from build-test-packet controller 330, data results fielddata 412 from microcode memory 310, and returned TID data 430 testresults selected through multiplexer 348 (see FIG. 2E) from the UUT MDC110; result-data indexes buffer 422 provides the pointer 418corresponding to the input TID as an operand (index to retrieve datapattern) to expected-result-data buffer 428. Thus, each TID 410corresponds to a particular data pattern, and the returned results dataincludes a TID 423 and data pattern 421, which are correlated by thecircuitry such that compare circuit receives the expected data 420 andthe returned result data 421 in a time sequence that allows the properdata to be compared, and if the data does not compare properly, anderror indication 434 is provided to control interface 122. In someembodiments, a result-data memory 426 provides storage for a series ofresults that are delivered as data 436 to JTAG control interface 122.

Thus, the memory daughter card (MDC) 110 for computer system 100 is verydifferent from conventional memory cards designed and used previously inthe computer industry. MDC 110 does not provide direct access to thememory parts on the card from the card's connector, but instead itreceives commands and functional requests through four high-speed ports121 that can not easily be connected to, or functionally tested by,general-purpose testers or conventional memory testers. This means thattest capability of the card must be designed into the card as part ofthe design process and, in some embodiments, needs to interact with andaccept test requirements of the vendor or vendors that will manufacturethe card. This invention describes the basic test requirements andcapabilities in support of all aspects of making and using a MDC 110: incard manufacturing and test, in initial system debug and checkout, infield test and support, in card repair, etc.

The test capability described here is typically not intended to replacea multimillion-dollar test system, but to enable verification of correctoperation of all components on the card and to support maintenance anddebugging functions when needed.

Error Correction and Reliability Enhancement

FIG. 3 is a block diagram of a computer system (having a single node101) of some embodiments of the invention, showing some details of amemory controller 127. In some embodiments, each of one or more eachmemory daughter cards 110 includes a W-chip or circuit 120 that includesone or more memory controllers 127, each of which drives a plurality ofmemory parts (or chips) 130.

For example, in some embodiments, each memory controller 127 drives oneor more sets 131 of chips 130, each set 131 having five DDR2 DRAM chips130, each chip 130 having an eight-bit-wide data interface, for a totalof forty (40) data bits going to and from each memory controller 127.Depending on the context, “set 131” is also referred to as “memoryportion 131” that is connected to one memory controller 127 (forembodiments having a plurality of memory controllers 127 each having amemory portion 131), or as “memory 131” that is connected memorycontroller 127 (for embodiments having one memory controller 127 havinga memory 131, wherein the memory portion is all of memory). In theseembodiments, this provides 32 program data bits, 7 ECC data bits and onespare data bit. Other embodiments use other widths of data interfaces tothe individual memory chips (e.g., 1-bit, 4-bit, 16-bit, 32-bit, orother width interfaces), and other numbers of program data bits (e.g.,64 or 128), ECC data bits (e.g., 8 or more), and/or spare data bits(e.g., 2 or more). In some embodiments, an ECC coding scheme is chosento correct all single-bit errors and not only detect all two-bit errors,but also to detect many or all package-wide errors. (See, for example,U.S. Pat. No. 5,745,508 “ERROR-DETECTION CODE” by Thomas Prohofsky,which is incorporated herein by reference.)

In some embodiments, a queue, buffer, or pipeline of pending requests520 is provided that accepts read and write requests at high burst ratesfrom the processor(s) and send requests to the memory parts 130 at arate that can be handled by those parts, and in some embodiments, thispipeline 520 also generates the ECC check bits for the data beingwritten. In some embodiments, an external refresh controller 540 isprovided in the W-circuit 120, which inserts read-refresh requests intorequest pipeline 520, which also primarily holds the read and writerequests from the processors 106. In some embodiments, external refreshcontroller 540 includes a refresh row counter 548 and a refresh columncounter 546. The row counter 548 cycles through all the rows of thememory parts frequently enough to meet the refresh-frequencyrequirements of the memory parts, which frequency is sufficient torefresh the memory parts across all rows regardless of the value that isprovided for the column address during the refresh-read request.

As used herein, a read-refresh mode of operation is one in which normalread-operation requests (called “read-refresh requests”) are insertedinto a stream of memory requests (for example, in some embodiments,these come from processors 106 and are held in pipeline 520), theread-refresh requests eventually specifying each and every row addressin memory within the required refresh interval of the memory parts. Insome embodiments, scrub operations are executed on each successive cycleof rows, by specifying and reading data from a different column address,and performing ECC checking. If a correctable data error is detectedwhen reading, then the corrected data is written back to the affectedlocation (a scrub operation). The read-refresh mode of operation iscontrolled by refresh controller 540.

In contrast, an explicit-refresh mode of operation is one in which theinternal refresh function within the memory parts is invoked, typicallyby sending a refresh command rather than a normal read command. In someembodiments, the memory parts then go into a somewhat extended refreshmode that refreshes one or more internal banks and/or rows based oninternal counters not visible to the external memory controller. In someembodiments, the explicit-refresh mode of operation is also controlledby refresh controller 540.

In some embodiments, a priority controller 522 is provided, whereinrequests from processors 106 are typically given higher priority (and,in some embodiments, the processors 106 can specify a priority for eachof their requests), and requests from the refresh controller 540 aretypically given lower priority. However, if a lower-priority refreshrequest has been held off for too long a time, timer 542 andrefresh-priority adjuster 544 specify to priority controller 522 toincrease the priority of the old refresh requests, in order that therefresh-frequency requirements of the parts are met, and data are notlost.

In some embodiments, for read requests and read-refresh requests, theDRAM chips 130 are first sent (from memory controller 127) a row addressusing a subset of the address bits, which causes one entire row of databits (e.g., 8,192 bits, in some embodiments) to be read into internalrow latches. The DRAM chips 130 are then sent a column address (e.g.,eight bits) that selects one set of, e.g., 32 bits selected from the8,192 row bits. The selected 32 bits are then multiplexed to foursuccessive sets of eight bits that are sent in a burst (i.e., foursuccessive 8-bit bytes are sent from each of five chips 130, thusproviding the memory controller four successive data words from each setof chips 130, each word having thirty-two program-data bits, sevenECC-data bits and one spare data bit, for example).

In some embodiments, ECC, refresh and scrubbing, and/or bit swapping, asdescribed for the present invention, are implemented inside each memorychip 130. For example. in some embodiments, each row inside a memorychip further includes the ECC bits (e.g., 2048 ECC bits for 8192 databits using a 32+7-bit data word, or 1024 ECC bits for 8192 data bitsusing a 64+8-bit data word) and/or spare bits. When a column address issent, both data and ECC bits, and optionally spare bits (e.g., for atotal of 40 bits, in some embodiments), are selected from the desiredrow, and are multiplexed to, e.g., five successive sets of eight bits,that are sent in a burst (e.g., five successive 8-bit bytes are sentfrom one chip 130, thus providing the memory controller four successiveprogram-data bytes and one extra byte having seven ECC-data bits and onespare data bit, for example, or four successive 10-bit pieces could beoutput in other embodiments). Other embodiments could implement, e.g.,64 data bits, 8 ECC bits, and N spare bits (the external interface couldburst, for example, nine 8-bit portions, eight 9-bit portions, or four18-bit portions). Such embodiments (having any arbitrary number of databits and a sufficient number of ECC bits for each address) allow some orall of the ECC checking and correction of block 530, the ARCW unit 532,the bit swapping of units 560 and 510, and/or the scrubbing and refreshfunctions of block 540 to be implemented inside each one of memory chips130.

In modern memory technology, other data widths are available (4-bit-widedata path, 8-bit-wide data path (as described herein), 16-bit-wide datapath, and 32-bit-wide data path). Before another reference is made tothe same bank, the content of the associated row buffer is written tothe same row location from which it was read. This accomplishes therefresh function and also saves any write data that was changed(written) in the row buffer.

This, and different page sizes (number of bits in a single row of asingle bank), make the mapping of which memory bits are row and columnselects more complex. In addition this affects the column multiplexerand also affects the distributed-refresh function (and therefore theother functions) in a computer's design.

The ECC circuitry in ECC-checking pipeline 530 is used to detect single-and double-bit (and certain multi-bit) errors and correct single-biterrors in each of the successive four words. In some embodiments, thefour words are corrected (as needed) on the fly through pipeline 530,and four correct words are sent to the processors 106, if the readrequest was from the processors (read data 380 from read-refreshrequests are discarded). In other embodiments, the four words are sentraw towards the processors in a pipeline, and if an error is detected,then a subsequent command tells the processor to hold or abortprocessing on the raw words and wait for corrected data to be sent.

In some embodiments, if an error is detected by ECC checking circuit 530in any of the four words read, information identifying the locationhaving the error, and other information regarding the error (such as thetype of error, which bit had the error, etc.) is logged in a error-logbuffer 534 on the W-circuit 120. In some embodiments, by the time theerror is detected, one of a plurality of processors could have sentwrite data to the affected location, thus changing the data at thelocation. Thus, in such embodiments, it is undesirable for the memorycontroller to write the corrected version of the originally read datadirectly back to the memory-chip location, since it could overwritenewer data that was written by other sources in the meantime.

In some embodiments, at least a portion of the refresh function is alsoperformed by refresh controller 540 scheduling normal read-refreshoperations into queue 520, and also providing a scrubbing function(performing a correction and write back if an error was found in theread-refresh data). This also could cause problems if the memorycontroller 127 were to write the corrected version of the read-refreshdata directly back to the memory-chip location, since it could overwritenewer data that was written by the processor(s) in the mean time.

Thus, one aspect of the invention is, if a correctable error isdetected, for the atomic read-correct-write (ARCW) controller 532 ofW-circuit 120 to insert, into the queue 520 of pending memoryoperations, a command that performs an atomic read-correct-writeoperation, wherein the affected section of memory is idled (theprocessors and other users of the memory are temporally locked out ofperforming operations there, and pending operations from the queue 520for the requested memory bank are not allowed to issue until the ARCWcompletes), then the data from the affected location is again read, ECCcircuit 530 is used to detect and possibly correct error(s) (since oneor more further errors may have occurred since the first correctableerror was detected, resulting in an uncorrectable double-bit error, or aprocessor could have written new data to the location, thus possiblyeliminating the error, especially for bits having “soft” errors that goaway when good data is written, in contrast to “hard” errors that remainstuck), and if corrected data is obtainable, it is written back to theaffected location, and a log entry is made into error-log buffer 534.

In some embodiments, in each memory controller 127, the queue 520 isimplemented as a buffer of pending memory requests connected to one ormore inputs of an arbitration circuit that selects and issues whichmemory request is sent next to the section of memory 131 connected tothat controller 127. The output of the arbitration circuit is connectedto the section of memory 131, and includes the memory request that isissued to that portion of memory 131 for that memory controller 127. Insome embodiments, the requests for read-refresh, explicit refresh (INSOME EMBODIMENTS, SIMPLY IMPLEMENTED BY A TIMER), and/or atomicread-correct-(optionally swapping bits)-and-write (ARCW) operations areplaced in registers that also input to the arbitration circuit, suchthat the arbitration circuit can choose between a processor-sourcedmemory-request operation and a pending refresh (or ARCW) operation.Since the pending refresh requests are not in arbitrary locations in thebuffer, but are instead in specific registers, the refresh controller540 can access and increase their priority if too much time has passed,thus forcing the arbitration circuit to service those requests withinthe refresh interval required by the memory parts. Early in a givenrefresh interval, the arbitration circuit would select processor-sourcememory requests, and only if none of those were pending would therefresh request be issued. Later in the refresh interval, the priorityof the refresh request is increased, and the arbitration circuit wouldimmediately choose to issue the refresh request. In some embodiments,the priority of the ARCW operation to correct a single-bitECC-correctable error could also be set at low priority initially (thearbitration circuit giving priority to processor-sourced memory requestsat that time), and then later be set to a higher priority, in order thatthe error is corrected before a further bit error occurred at thatlocation to making the error uncorrectable.

In some embodiments, the arbitration circuit of queue 520 will prevent aconflicting access from being issued, i.e., during the operation of anARCW or other atomic operation to a portion of memory (e.g., one bank),other accesses to that portion of memory will be inhibited, but accessesto other portions of memory will be issued and performed. In someembodiments, each set 131 of memory chips 130 has a plurality of banks(e.g., in some embodiments, eight banks for each controller 127), sowhen an ARCW or atomic swap-bits operation is being performed to alocation in one of the banks, other accesses to that bank are inhibited,but accesses to the other banks (e.g., the other seven banks) continueto be issued. In some embodiments, explicit refresh operations affectall banks for one memory-chip set 131, so explicit refreshes stopaccesses to all banks, in contrast to read-refresh operations thataffect only a single bank at a time and can be interleaved andarbitrated more efficiently, thus providing enhanced performance.

If the error was not correctable (i.e., from multiple-bit errors), a logentry is made indicating that (more severe) error. In some embodiments,the logged errors are accumulated and (possibly later) reported to theprocessor. In some embodiments, one or more further ARCW operations areperformed to determine whether the error is a hard error (one that wasnot corrected by simply writing correct data to the location, asindicated by the same error being again detected) or a soft error (onethat is corrected by simply writing correct data to the location,wherein no error is detected on subsequent reads), and the result ofthat determination is logged and possibly reported.

Once these operations are completed, the hold is removed from theaffected section or bank, and operations from the processor(s) areallowed to resume (e.g., by such requests again being allowed from queue520). In some embodiments, only requests for the memory bank whose datais being referenced are held (i.e., kept in the buffer and preventedfrom being sent to the memory parts), allowing normal memory referencesto occur to the other memory banks. In some embodiments, this comes at acost of a more complex queuing and buffering implementation.

As used herein, an “atomic” (meaning “indivisible”) read-correct-write(ARCW) operation is one in which, for at least the affected address, noother memory-access operation is allowed after the read portion andbefore the write portion. Some embodiments lock only the one locationaddressed by the ARCW but allow other read or write operations to accessany other locations in memory since the ARCW operation need be onlyrelatively atomic (atomic as to the location affected). Otherembodiments lock the one section or bank of memory that includes theaffected address and allow accesses to other sections or banks, and yetother embodiments lock larger portions or the entire memory for theduration of the ARCW operation. Thus, in some embodiments, an ARCWoperation causes the queue 520 for only one memory controller 127 to beemptied (for example, in some embodiments, the pending operations areallowed to complete, but no other operations are accepted until thewrite portion of the operation commits to complete; e.g., the writeoperation with the corrected data could be in the queue with the highestpriority, and then the queue could accept requests having a prioritythat would not pre-empt the atomic write portion, or the otheroperations could be made to wait until the operation finished). Thismakes the ARCW “atomic” by locking out any requests for all addresses inthat section or bank of memory connected to that particular memorycontroller 127. In other embodiments, the atomic ARCW locks out requestsfor only a subset of addresses in the affected section of memory, forexample, only the single address that is to be touched by the ARCWoperation, or only a row or other subset of addresses. Thus, to be“atomic,” no other operations are allowed at least to the affectedaddress, and in some embodiments, a larger number of addresses areaffected in order to simplify the circuitry and control, for example,the atomic lockout could affect the entire section of memory chipsattached to one memory controller 127, or to all the memory sectionsattached to one MDC 110.

In some embodiments, the ARCW function is relatively independent ofwhether a normal processor read request caused the memory reference thatresulted in the detected error indication, or whether a read-refreshrequest caused the memory reference that resulted in the detected errorindication, in that the same ARCW operation is performed and insertedinto the stream of requests to a memory controller 127. Notice thoughthat during a bit-swapping operation, the read operation is performedusing the normal bit mapping, and the write operation is performed usingthe bit-swapped mapping.

In some embodiments, the bit-swapping operation is performed by logicthat uses or shares the refresh circuitry. In some embodiments, when abit-swapping operation is being done, no initial read-refresh operationis performed and only the ARCW operation portion is done at eachsuccessive address in the portion of memory that will be affected by thebit-swapped mapping, since the ARCW is refreshing the addresses it useswhen row-sequencing is done fast enough to meet the refresh requirementsof the memory parts, and since an ARCW operation will be scheduledregardless of whether an error is detected or not, then no regular readneed be done. Since the ARCW operations are performed on the timetablerequired by the refresh circuitry, no separate read-refresh operationneed be scheduled for the affected portion of memory though the timingrequirements of Refresh will determine at least a portion of the addresssequence.

While, in some embodiments such as those shown, the request queue 520,ECC checking pipeline 530, and refresh controller 540 are shown withinmemory controller 127, in other embodiments, they can be implementedexternally within W-chip or circuit 120.

In some embodiments, the memory chips 130 also include an internalrefresh controller (IRC) 550, each of which has its own row counter,since AutoRefresh is a standard feature of most current DRAMs. Whenmemory chips 130 receives an explicit refresh command (which is separateand not related to the read-refresh requests discussed above), the chips130 go into an internal refresh mode and refreshes one or more rows ofmemory bits in one or more of its banks. In some embodiments, this takesa relatively long time, during which regular read and write requests arelocked out, resulting, e.g., in up to 2.2% overhead for explicitrefresh. If the read-refresh request mode of operation takes less timethan the explicit-refresh mode, then read-refresh mode can be used, andexplicit refresh commands would not be sent and the internal refreshcontroller in the memory chips would not be used.

If, however, the read-refresh request mode of operation takes more time(i.e., costs a higher percentage overhead) than the explicit-refreshmode, then the read-refresh mode is used at a lower frequency (generallya much lower frequency) in order to scrub memory of soft single-biterrors, and explicit-refresh commands are sent and the memory chip'sinternal refresh controller is used. For example, if the read-refreshmode takes 3.6% overhead and the explicit-refresh mode take only 2.2%overhead, there is a performance gain by using the explicit-refresh modeat least part of the time, but at the cost of not as often performingthe scrub operation that is included in the read-refresh mode ofoperation.

In some embodiments, a bit-swapping circuit 600 is provided, whereby ifa bit in the memory data-bus interface 129 or in chips 130 is detectedas faulty, failing, or questionable, that bit can be swapped out. Insome embodiments, one of the processors 106 sends a command throughcontrol interface 122 to cause the swapping to occur, and specifies arange of addresses within which the bit will be swapped. In someembodiments, the starting address to swap is zero (such that startingaddress 561 can be assumed to be zero, simplifying the address comparesthat need to be performed, and increasing the possible speed) within agiven section or bank of memory, and successive addresses (i.e., 0, 1,2, . . . ) are swapped until all addresses within the entire bank orsection of memory are handled. Having a zero starting address and apower-of-two size simplifies range checking. In other embodiments, anon-zero starting address can be specified, and/or a non-power-of-twosize can be specified, in order to be able to handle differently swappedbits within a given memory space. Then, when a normal read or writeaccess request is received, an address 565 from pipeline 520 is comparedby address detector 564, and if it is found to be between a startingaddress 561 and a current address 562, then address detector 564commands bit-swapping controller (also called the spare-bit replacementcontroller) 510 to shift all bits on one side of the failing bit, inorder to use the spare bit and ignore the failing bit, as describedbelow.

Some embodiments further include a background-replacement operation (insome embodiments, as part of the read-refresh mode of operation) thatreads data from each successive location in an identified section ofmemory under the original bit-allocation scheme, corrects the data ifneed be, and writes the data (as corrected) back to its location usingthe bit-shifted scheme that eliminates a failed or questionable bit andinstead uses the spare bit. The ending address 563 is used by the systemto specify the ending address for this series of individual swapoperations, as described in FIG. 7 and FIG. 8. During this replacementprocess, the processor can continue sending memory requests to thataffected section of memory, and the memory controller will map the bitsto and from memory using the original bit mapping for the portion thathas not been reallocated, and using the spare-bit-replacement bitmapping for the section of memory that has been reallocated with thespare bit.

FIG. 4A is a block diagram of a bit-swapping circuit 400 used by memorycontroller 127, used in conjunction with the address-range comparisoncircuitry (e.g., spare-bit replacement controller 510) in someembodiments of the invention, shown in its non-activated state.Bit-swapping circuit 400 includes a plurality of 2-bit to 1-bitread-data multiplexers 511 (i.e., 511.0, 511.1, 511.2, 511.3, 511.4,511.5, and so on, through 511.N−1, and optional 511.S (which, in someembodiments, is included to make all the delays equal and to allow testreads from and writes to the spare bit)), which, in their “unswitchedstate” as shown have an output equal to their left-hand input, and intheir “switched state” have an output equal to their right-hand input.Another plurality of 2-bit to 1-bit write-data multiplexers 512 areprovided (i.e., 512.0, 512.1, 512.2, 512.3, 512.4, 512.5, through512.N−1, and 512.S for the spare bit), which, in their “unswitchedstate” have an output equal to their right-hand input, and in their“switched state” have an output equal to their left-hand input. In thenon-activated state shown in FIG. 4A, all multiplexers 511 and 512 arein their unswitched state 524, and will write the 39 data bits (numbered0 through 38) to their normal bit positions, and will read the 39 databits (numbered 0 through 38) from their normal bit positions. In someembodiments, the spare-bit position is written and read, along with theother memory bits, to better support memory testing, and to even thetiming path lengths. In other embodiments, multiplexer 511.S andmultiplexer 512.S are in “don't care” states (typically set to theunswitched state), and the spare bit is not used. Suppose, however, thatbit 3 of memory is faulty (e.g., either stuck zero or one, or is often,repeatedly, or even occasionally giving soft or hard single-bit errors).In such a situation, one wants not to use bit 3, but instead to use thespare bit for reads and writes. (One understands that any of the otherdata bits can be replaced by the spare. Bit 3, used here, is only anexample.)

FIG. 4B is a block diagram of an activated bit-swapping circuit 401 ofsome embodiments of the invention (i.e., the circuit of FIG. 4A, bitshowing a configuration that is activated to swap bits). Rather thandirectly switching the spare bit and any arbitrary failed bit, the bitsto one side of the failed bit are shifted one position, so that the badbit is not used and the good spare bit is used. For example, if bit 3failed, then on write operations source bits 0-2 are written to theirnormal positions by the multiplexers 512.0, 512.1, and 512.2 in theirunswitched state 524, and source bit 3 and the bits to the right of bit3 are shifted right one position by the multiplexers 512.3 through 512.Nand 512.S in their switched state 525 (i.e., bit 3 gets written tomemory bit-4 position, and source-bit 38 gets written to the memoryspare-bit position). On read operations destination bits 0-2 are readfrom their normal memory positions by the multiplexers 511.0, 511.1, and511.2 in their unswitched state 524 and destination bit 3 and the bitsto the right of bit 3 are read and then shifted left one position by themultiplexers 511.3 through 511.N in their switched state 525 (i.e., bit3 gets read from memory bit-4 position, and destination bit 38 gets readfrom the memory spare-bit position). While, in some embodiments, readmultiplexer 511.S is omitted, since it is generally not switched, it isnormally present so that path delays are equal and also to support ofmemory test functionality. Spare-bit replacement controller 510 can beswitched from activated or deactivated, or from one active state toanother, between each memory access (or each access burst of four wordsfor some DRAM architectures), thus allowing a portion of the memory tobe bit-swapped, and the remainder to be unswapped.

In some embodiments, the data from each location are moved from theunswapped bit configuration to the swapped bit configuration one at atime (for example, using an atomic read-correct-write operation thatforms the core of the read-refresh mode of operation), while moving therange pointers as the operation proceeds, as described below.

FIG. 5 is a block diagram of a multiple-bit-swapping circuit 500 of someembodiments of the invention. Multiple-bit-swapping circuit 500 includesa plurality of groups of 2-bit to 1-bit read-data multiplexers 521(i.e., 521.0, and so on, through 521.N−2, 521.N−1, and spare-bit group521.S (which, in some embodiments, is included to make all the delaysequal and to allow test reads from and writes to the spare bit)), which,in their “unswitched state” have an output equal to their left-handinput, and in their “switched state” have an output equal to theirright-hand input. Another plurality of groups of 2-bit to 1-bitwrite-data multiplexers 522 are provided (i.e., 522.0, and so on through522.N−2, 522.N−1, and 522.S for the group of spare bits), which, intheir “unswitched state” have an output equal to their right-hand input,and in their “switched state” have an output equal to their left-handinput. In the non-activated state shown in FIG. 5, all multiplexergroups 521 and 522 are in their unswitched state 524 (see key of FIG.4A), and will write the N groups of data bits (numbered 0 through N−1)to their normal bit positions, and will read the N groups data bits(numbered 0 through N−1) from their normal bit positions. In theembodiment shown, there are four spare bit positions provided, and ifbits are swapped, the operation is done in groups of four bits. In otherembodiments, other numbers of spare bits are provided. In someembodiments, the spare-bit positions are written and read, along withthe other memory bits, to better support memory testing. In otherembodiments, multiplexer 521.S and multiplexer 522.S are in “don't care”states (typically set to the unswitched state), and the spare bits arenot used. Controller 519, like the corresponding controller 510 in FIG.4A and FIG. 6, swaps the bits for addresses within a specified range,and does not swap the bits for addresses outside that range. In someembodiments, the blocks marked 400 and 510 in FIG. 3 and FIG. 6 isreplaced by blocks 500 and 519 of FIG. 5.

FIG. 6 is a block diagram of a bit-swapping and address-detectioncircuit 600 including the address-detection circuitry 564 from FIG. 3,connected to a bit-steering circuit 601, as used in some embodiments.Circuit 601 can be implemented as a single-bit swapping circuit 400/401of FIG. 4A and FIG. 4B, or as a multiple-bit swapping circuit 500 ofFIG. 5. The address-detection circuitry 564 of block 127 is describedabove for FIG. 3. An ARCW operation to swap one or more bits readsthrough the “unswitched” selectors 511 to obtain data 602 that ischecked by ECC detection circuit 530 and corrected, if necessary, bycorrection circuit 536. The corrected data is then queued in buffer 520and written back using the swapped configuration defined by selectors512 and the spare bit of memory 131. In some embodiments, the address ofthe location to be swapped is just on the outside edge of the addressrange defined by registers 560 (the address for which swapping takesplace) when the read operation takes place. The address range ofregisters 560 is then changed, so that the same address when used forwriting the corrected data is just on the inside edge the address rangedefined by registers 560, and detected by circuit 564.

FIG. 7 is a flowchart block diagram of refresh/scrubbing/bit-swappingprocess 700 of some embodiments of the invention. Regular processing ofread and write operations from processors 106 to MDCs 110 takes place atblock 710, overlapped or multiplexed in time with read-refreshoperations 711 and/or ordinary explicit-refresh operations 712. Asdiscussed above, in some embodiments, if the read-refresh processing 711takes less time or overhead, it is exclusively used for the refreshfunction; however, if it take less time or overhead to do the ordinaryexplicit-refresh function, using either a row address only from counter548, or using a timer-controlled command that triggers aninternal-refresh operation inside the memory chips 130 usinginternal-refresh controller 550 (see FIG. 3), then the refresh functionis used for scrubbing and spare-bit insertion and will toggle betweenblocks 711 and 712. That is, explicit refresh block 712 will be used tosave time (only if it is faster).

In some embodiments a mode bit is set at the time a system is broughtinto operation that controls this refresh-mode choice. When explicitrefresh mode block 712 is used, some embodiments include a test at block714 to determine whether it is time for another scrub operation, and ifso perform a read and check ECC (i.e., block 714), and a scrub (ARCW) ifan error is detected. At decision block 713, when a sufficient amount ofmemory is checked and scrubbed (e.g., in some embodiments, one locationat a time is scrubbed), decision block 713 will return to the explicitrefresh mode 712. That is, in some embodiments, when explicit refreshmode 712 is used, an additional scrubbing read will be occasionallyperformed, but is not relied on for refreshing since the explicitrefresh is providing that function. In some embodiments, if theread-refresh mode 711 is faster, then the dotted-line blocks 712, 713,and 714 are not used.

In some embodiments, the refresh function of the present invention ismanaged as follows: memory controller 127 provides one or both of twomemory-refresh control functions: using block 712, the memory parts 130themselves can internally perform the refresh function, wherein, in someembodiments, each memory part 130 includes an internal address counterindicating where the next refresh is to occur (the refresh operationtakes place generally after a specific command is sent from the localmemory controller 127) or, alternatively, using block 711, the memorycontroller 127 sends “normal” memory references (i.e., read commands) tothe attached memory parts 130 using a specific address ordering andrequest rate in order that all memory bits are referenced within therequired refresh interval.

There are trade-offs in either way of doing memory refresh. Having eachmemory part perform its own refresh (block 712) has the advantage ofsimplicity—one command refreshes multiple banks in the memory chips—butthe direct effects of the simplicity also have disadvantages: all theinternal memory banks must be idle before starting a refresh cycle and apower transient is caused because all internal memory banks are startedat the same time by the internal-refresh controller 550. The result isthat memory performance is lost because of timing and functionalrequirements, and extra implementation costs are incurred (for example,more filter capacitors must support the memory than would otherwise berequired).

If the refresh function is totally driven by the memory controller 127(block 711), total memory performance can be increased (if that mode isfaster) and design effort reduced, even though the total number ofrefresh operations per second is increased. Each memory-read referenceonly refreshes one memory row of one bank, so that more refreshreferences must be executed to reference all the memory banks, but theseare interleaved in normal operations, so doing this does not cause any“extra” loss of memory cycles, as does the memory's “automatic”explicit-refresh function (block 712). Memory performance is increasedbecause less total time is spent in the memory parts executing refreshfunctions. Controller-design effort is reduced because refresh timing isthen the same as that for any other memory request. Electrical noise andpower variations are also significantly reduced.

Memory Scrubbing for Increased Memory Reliability

Soft memory errors are generally handled by error-correction codes suchas SECDED (single-bit error correction, double-bit error detection) andthe like. Memory scrubbing has sometimes been used in conjunction withSECDED.

In some embodiments of the present invention, memory scrubbing occurs aspart of the read-refresh mode of operation (block 711) that regularlyreads all of memory row-by-row and thence column-by-column. If an erroris detected (block 720), the logic then corrects single-bit errors. Thisprevents the accumulation of multiple single-bit upsets which then cancause multiple bits in a word (or whatever data item size is covered bythe error-correction mechanism) to become upset and therefore becomeuncorrectable and be considered corrupt.

FIG. 8 shows a schematic timing chart 800 for read-refresh scrubbingused in some embodiments. For example, for the refresh function, in someembodiments, the data from row 0 column 0 is read 801, which refreshesrow 0 and also allows the memory controller to check the ECC from thatword of data (e.g., from address 0 in that section of memory), and thedata is discarded. Normal read and write operations 899 from theprocessors then proceed. In some embodiments, if a normal read operationdetects a correctable error (block 720 of FIG. 7), then a correctedversion of the data is sent to the processor (block 722) and controlpasses to block 723, whereas if the error is detected as a result of ascrub refresh (path 721), the data is discarded and control passes toblock 723. (Typically, about forty to one hundred or more normaloperations can be done between refresh reads, giving a refresh overheadof about one to two-and-a-half percent, in some embodiments.) If an ECCerror is detected, an ARCW operation 802 (see FIG. 7 block 723) toaddress 0 is scheduled. At a later time (within the time period to allowall rows to be refreshed within the required refresh interval), rowcounter 548 (see FIG. 5) is incremented and the data from row 1 column 0is read 811, which refreshes row 1 and checks the ECC from that word ofdata (e.g., from address 8,192 in that section of memory, if each rowhas 8,192 positions), and the data is discarded. Normal read and writeoperations 899 from the processors then proceed. If an ECC error isdetected, an ARCW 812 (see FIG. 7 block 723) operation to address 8,192is scheduled. At a later time, row counter 548 is incremented and thedata from row 2 column 0 is read 821, which refreshes row 2 and checksthe ECC from that word of data (e.g., from address 16,384 in thatsection of memory), and the data is discarded. If an ECC error isdetected, an ARCW operation 822 (see FIG. 7 block 723) to address 16,384is scheduled. This sequence is repeated until all rows have beenrefreshed and all data from column 0 has been scrubbed. At read 831, thelast row (N) is read, and if needed, at ARCW 832, the data word iscorrected. Row counter 548 then wraps back to zero.

Then, the column counter 549 is incremented, and the data from row 0column 1 is read 841, which refreshes row 0 and checks the ECC from thatword of data (e.g., from address 1 in that section of memory), and thedata is discarded. If an ECC error is detected, an ARCW operation 842(see FIG. 7 block 723) to address 1 is scheduled. At a later time(within the time period to allow all rows to be refreshed within therequired refresh interval), the data from row 1 column 1 is read 851,which refreshes row 1 and checks the ECC from that word of data (e.g.,from address 8,193 in that section of memory, if each row has 8192positions), and the data is discarded. If an ECC error is detected, anARCW operation 852 (see FIG. 7 block 723) to address 8,193 is scheduled.At a later time, the data from row 2 column 1 is read 861, whichrefreshes row 2 and checks the ECC from that word of data (e.g., fromaddress 16,385 in that section of memory), and the data is discarded. Ifan ECC error is detected, an ARCW operation 862 (see FIG. 7 block 723)to address 16,385 is scheduled. This sequence is repeated until all rowshave been refreshed and all data from column 1 have been scrubbed. Thisoverall sequence is repeated until all data from all N rows and all Mcolumns of this section of memory have been scrubbed. At read 871 thedata from row (M) column (N) is read and checked, and if needed, at ARCW872, the data word is corrected. At time 881, row counter 548 then wrapsback to zero, and column counter 549 wraps back to zero. At point 881,control typically passes back to point 801; however, if bit swapping isdesired, control passes to point 901 of FIG. 9, and when done, controlpasses to point 801 from point 981.

FIG. 9 shows a schematic timing chart 900 used in some embodiments. Forthe bit-swapping function, control would pass to entry point 901 frompoint 881 of FIG. 8, 1081 of FIG. 10, or directly as a result of anexternal maintenance function. In some embodiments, the data from row 0column 0 is atomically read (using a first bit configuration),corrected, and written back (using a second bit configuration that swapsone or more bits) 902, which also refreshes row 0. Theatomic-read-correct-swap-write (ARCSW) operations 902, 912, 922, 932,942, 952, 962, and 972 will provide the refresh function and will bedone for every location within the selected portion of memory for theswap operation. Normal read and write operations 899 from the processorsproceed. The ARCSW operation 902 reads from the location using thenormal bit mapping, corrects the data if need be, and then writes to thesame location but using the bit-swapped mapping to store the data usingthe spare bit or bits. At a later time (within the time period to allowall rows to be refreshed within the required refresh interval), rowcounter 548 (see FIG. 5) is incremented and ARCSW 912 (see FIG. 7 block723) operation to address 8,192 is scheduled. This sequence is repeateduntil all rows have been refreshed and all data from column 0 has beenscrubbed and rewritten. At ARCSW 972, the data word from the last row(M) and the last column (N) is atomically read, corrected, swapped andwritten. Row counter 548 then wraps back to zero. In some embodiments,data is never read and discarded when doing the bit-swapping andspare-insertion operations.

FIG. 10 shows a schematic timing chart 1000 used in some embodiments.For example, control passes in from point 981 of FIG. 9, and anAutoRefresh command 1003 is sent to the memory parts, and in someembodiments, the data from one or more rows are internally read but notsent externally to the memory pins, which refreshes those row(s). Aninternal row counter in each memory part, not visible externally,chooses what rows are refreshed. At an infrequent interval (for example,in some embodiments, an interval sufficient to scrub all memory aboutonce per hour), a read 1001 of row 0 column 0 is performed, and thecontroller 400 checks the ECC from that word of data (e.g., from address0 in that section of memory), and the data is discarded. In someembodiments, Read operation 1001 is in addition to the AutoRefreshoperations 1003, 1004, 1005, 1006, 1007, 1008 and 1009, and thus read1001 is not utilized for its refresh capability, although it doesrefresh row 0 data. Normal read and write operations 899 from theprocessors then proceed. If an ECC error is detected, an ARCW operation1002 (see FIG. 7 block 723) to address 0 is scheduled. Normal read andwrite operations 899 from the processors then again proceed, withAutoRefresh commands 1003, 1004, 1005, 1006, 1007, 1008 and 1009 beingperiodically issued. At a much later time (independent of the requiredrefresh interval), row counter 548 (see FIG. 5) is incremented and thedata from row 1 column 0 is read 1011, which refreshes row 1 and checksthe ECC from that word of data (e.g., from address 8,192 in that sectionof memory, if each row has 8,192 positions), and the data is discarded.Normal read and write operations 899 from the processors then proceed.If an ECC error is detected, an ARCW 1012 (see FIG. 7 block 723)operation to address 8,192 is scheduled. This infrequent scrubbingcontinues until the data from row N column M is read 1021, whichrefreshes row N and checks the ECC from that word of data (e.g., fromthe last address in that section of memory), and the data is discarded.If an ECC error is detected, an ARCW operation 1022 (see FIG. 7 block723) to that last address is scheduled. This sequence is repeated untilall rows have been refreshed and all data from column 0 has beenscrubbed.

This overall sequence is repeated until all data from all N rows and allM columns of this section of memory have been scrubbed. At read 1071 thedata from row (N) column (N) is read and checked, and if needed, at ARCW1072, the data word is corrected. At time 1081, row counter 548 thenwraps back to zero, and column counter 549 wraps back to zero. At point1081, control typically passes back to point 1001; however, if bitswapping is desired, control passes to point 901 of FIG. 9.

In some embodiments, the AutoRefresh function and thescrubbing/spare-bit functions will be totally independent so that thereis little interaction except where, for example, the AutoRefreshfunction must idle memory so that AutoRefresh works correctly and asspecified by the memory chip manufacturers.

Thus, if during regular processing (block 710 of FIG. 7) or read-refreshprocessing (block 711) an error is detected, and if the error iscorrectable by the ECC, then control is passed to block 720. If theerror was from a read request from regular processing, at block 722 thecorrected data is sent to the requesting processor, but for a scr5uboperation (path 721), the data is discarded. In either case, controlthen passes to block 723, and an atomic read-correct-write operation isscheduled, in which all other processors' requests and read-refreshrequests are either held off from starting, or are completed, from queueor pipeline 520 (FIG. 3) and further requests are temporarily lockedout, the read operation is performed, and the correct and writeoperations are done, and then the pipeline 520 is unlocked so it canaccept and process all regular requests. In some embodiments onlyrequests for the same bank, row or data word are held whilenon-conflicting requests are processed normally. In some embodiments, atblock 724, information regarding the error is entered into log buffer534 on the W-circuit 120, indicating such information as the section,address, bit number, and type of error, etc. At decision block 725, itis determined whether a sufficient number or severity of the trackederrors warrants reporting the errors recorded in log buffer 534 to oneof the processors 106. If so, in some embodiments, at decision block 726the processor analyzes the data and determines whether to start a swapoperation, and if so, then control passes to block 730. In someembodiments, if either or both criteria from blocks 725 and 726 are notmet, control passes back to the refresh or regular processing.

In some embodiments, error reports will enable or cause a swap sequenceto be entered directly rather than have a hardware-determined number oferrors occur before a swap sequence is set in motion.

In some embodiments, the generic memory-refresh function or functionsare made more capable by providing that the refresh rate becomevariable, for example, as controlled through a control or mode registerthat is most often written as a system is powered up and configured.This accommodates differing refresh requirements caused by differingmemory densities or other similar requirements and enables testingmemory-refresh margins.

In some embodiments, if an analysis of the detected memory-bit errorsshows a sufficient increase in the rate of errors in some or all ofmemory 130, a service call is made to fix the memory. In otherembodiments, the refresh rate for the affected portion is temporarilyincreased during operation of the system, and a further analysis ofsubsequent error rates is made to see if the increased refresh frequencyreduced the observed error rate. Thus, in some embodiments, anadditional determination is made at optional decision block 740 as towhether to increase the refresh rate (for the read-refresh operation 711or the explicit-refresh operation 712 or both), and if so, at block 741the appropriate refresh rate or rates are increased. In someembodiments, the analysis for decision block 740 is also performed inone of the processors 106. In some embodiments, the analysis isperformed at system boot-up and initialization, and/or during normalprocessing. An increased refresh rate might be indicated if the analysisshowed that perhaps the refresh rate being used was affecting errorrates.

Similarly, when AutoRefresh is being done, the rate of memory scrubbingcan be variable.

Using Spare Bits to Enable Substantially Uninterrupted ContinuedOperation in Presence of Memory Failures

If not all bits in a memory word are used for normal system operation,the unused bits are available for use as spare bits to be swapped forother bits detected as faulty. Thus, if in a particular memory design,thirty-nine (39) bits of memory are required to be written and read withtransfers to and from memory, and with memory parts normally availablewith 4-, 8-, or 16-bit data widths, an unused bit position in the datapath is available if advantage can be made of its use. A 39-bit datapath arises naturally when 32-bit data interfaces are used, as SECDEDfor 32 data bits takes a 7-bit checkbyte. In other embodiments, morethan one spare bit is provided, such that if single-bit failures in thedata path occur more than once, the other spare bits can also be swappedin.

A spare-bit capability is used to replace a defective or failing bit ina particular data path with another bit that, up to that point, wasunused. The failure could be anything from a single stuck bit in memoryto failing wiring nets, chip pins, or any similar failure that affectsonly a single data-bit path in a memory interface. FIG. 6 shows onepossible implementation of a spare-bit capability in which the logicrequired to implement the function is relatively small and generallywill have little to no effect on memory performance.

Other Extensions to Refresh

In some embodiments, since there is a relatively long time betweensuccessive refresh operations (whether in explicit-refresh mode 712where refresh commands are sent to the memory parts, or in read-refreshmode 711, wherein each row and column is read in a sequence), thepriority of the refresh requests generated by the memory controller 127is made variable, and initially specified by refresh-priority circuit544. Early in the range of times that a particular refresh operationmust be done, the priority of the refresh request is set very low sothat no memory request from the computer system is prevented fromstarting because a refresh operation that could have been postponed withno loss was initially scheduled (i.e., inserted to pipeline 520) aheadof the system request. As time within a refresh interval expires, thepriority of the refresh request is raised by priority controller 522, orby refresh controller 540 determining that time is running out andseeing no completion indication from an earlier low-priority refreshrequest, then changing the refresh request's priority to a higherpriority. In other embodiments, the controller could insert a duplicatebut high-priority refresh request into pipeline 520 so that the refreshoperation will have been done within the required refresh-interval time.Most embodiments avoid this duplicate request to avoid the performancepenalty of performing two refreshes if only one is required.

Extensions to Scrubbing

Another function that data scrubbing and logging can provide is toenable the detection and swapping of “stuck bits.” As the scrub logicpasses through memory repeatedly, it keeps track, for example, bywriting into error-log buffer 534, of the errors that have been found.If a memory data item is found and a repair attempted (by rewritingcorrected data), the fact is recorded so that if the same error is againobserved, the logic can detect that those errors are not softrecoverable errors but, instead, may be “hard” stuck bits. Theoccurrence of stuck bits in memory greatly increases the chances fordata corruption when using SECDED, because any soft error within therange of bits covered by each data checkbyte, in addition to the memorystuck bit, may be uncorrectable. (In some embodiments, additionalerror-recovery techniques are used, for example such as that describedin U.S. Pat. No. 4,319,357 “DOUBLE ERROR CORRECTION USING SINGLE ERRORCORRECTING CODE” by Douglas Bossen, which is incorporated herein byreference.) The keeping of a failure history of block 724 is thus usefulin its own right, for example by providing information such thatanalysis of blocks 725, 726, and/or 740, and needed maintenance—thedynamic swapping of bits of blocks 730-737 and/or increasing the refreshfrequency, or even replacing memory components that have permanentfaults or a significant number of transient errors—can be performed sothat the chance of uncorrectable memory errors occurring is greatlyreduced.

If it is decided at block 726 (or as a result of an external decision toperform maintenance) to swap a spare bit into a section of memory (e.g.,swapping bits such that a failing bit, for example bit 3, is not usedand the spare bit is used for each word in the entire section ofmemory), control is passed to block 730 of FIG. 7. At block 730, thestarting address 561 (see FIG. 5) and ending address 563 of the affectedsection are set, defining the address range that will have its bitsswapped. The current address 562 is initially set to equal the startingaddress 561, such that at the beginning, no addresses will have theirbits swapped (since there would be no addresses between the startingaddress and current address at that time).

In some embodiments, the starting address is initially zero within agiven bank or section of memory or within the memory controlled by onecontroller (or within the entire memory). The current address is thenalso set to zero. In some embodiments, this swap sequence starting fromzero will be held off until the refresh/scrub cycle completes (i.e.,wraps to zero), so that correct refresh timing is maintained for all ofmemory. The data from address zero is read using the normal bit mapping,and is then written back to address 0 using the new bit mapping (withthe faulty bit not used and the spare bit used). The current address isthen incremented, and the read-swap-write operation performed again, andthe operation repeated through the address space for which a swap isdesired. In other embodiments, the starting address need not be zero,such that arbitrarily bounded address ranges are used. In someembodiments, a plurality of address ranges can be specified, each havingits own specification of which bit to swap. Some embodiments use theestablished refresh timing for spare-bit insertion, while otherembodiments might use accelerated timing.

Note that the section size for the swap could include the entirety ofaddresses in one set 131 of chips (see FIG. 5) connected to onecontroller 127, or of all sets 131 connected to one memory controller127, or a subset of addresses (for example, one bank, row, or column)within one set 131 of memory parts that the analysis of block 726 hasdetermined should have its bits swapped. In some embodiments, alladdresses within a given section are to have their data bit-swappedwhenever any address is, to avoid a possible slowdown that could occurif only a subset of addresses is spared (since, in that case, theaddress compare function must always be active; this possibly slowsnormal operation.)

In some embodiments, at block 731, the starting and ending addresses areloaded into address detector 564, where they are used to compare to theaddress in each incoming request, in order to determine whether to swapbits for that request. For normal read and write accesses, controlpasses to block 715, so the “swap-in-progress” mode providessubstantially uninterrupted normal processing, where each processoraccess has its address checked, and accesses to addresses outside theswapped range have their data bits mapped to the normal configuration,and accesses to addresses within the swapped range have their data bitsswapped. Interspersed into the normal operations, there are scheduledoccasional atomic read-correct-swap-write (ARCSW) operations (block732). These include a read from the unswapped data bit configuration atthe current address (block 733), a check and/or correct of any detectedand correctable error (block 734), a bit-swap mapping and write of thedata to the current address (block 735), and an increment of the currentpointer (i.e., the pointer to the address at the edge of the swappedarea, which is used for the next swap operation 732 and for the swapprocessing of normal memory accesses of block 715) at block 736. Atdecision block 737, a check is made to determine whether the swapoperations have reached their specified end address, and if so, at block738 some embodiments reset to normal regular processing with the swappedbit or bits used in the affected section N. In some embodiments,multiple simultaneous different swap mappings are permitted within acard 110, or within a single memory controller 127, or even withindifferent banks or portions of memory 131 under control of one memorycontroller 127 by implementing sufficient pointers and compare andcontrol circuitry. In some embodiments, multiple bits can be swappedwithin a single bank, using circuitry such as shown in FIG. 5.

Other Improvements Provided by Using Spare-Bit Capability

Not only can a spare-bit capability be used to remove single stuck bitsbut in some cases the capability can be used for more general memoryproblems. For example, if a wire, pin or connector fails such that onlya single bit fails for a data item from memory, then all data words canbe seen to have the same error. The spare bit could be used toremove/hide the failure. Also, in a few cases there can be two failuresin a data word. When covered with normal SECDED this is data corruptionand the memory part with the failure must be replaced before systemoperation can be continued. The spare-bit capability can convert thatcase to a single-bit error which can be successfully hidden by SECDED.

In conventional implementations, the use of the spare bit would requirethat the system be restarted, because when the spare bit is “inserted”into the memory path for use in normal system operation, the contents ofmemory are corrupted because the steering for the bit is swapped for alladdresses simultaneously, but the data in the memory is in the originalbit positions. In such instances, the best that can be done is to 1)stop system operation, 2) dump the memory contents to storage device orsystem, 3) insert the spare memory bit, and 4) reload memory from thesaved storage. While a user can be grateful for continued operation witha relatively small downtime, they will be unhappy with the systeminterruption. Instead, a mechanism is provided with the presentinvention that allows normal system operation to continue while thespare-bit is inserted.

Aspects of Some Embodiments of the Invention

In some embodiments, a multipurpose function in the memory controllerprovides these desirable features (also discussed above):

A memory-refresh function that generates memory-read operations atspecified rates. The rate should likely be established by a writableregister so that different rates can be specified for differentmemory-chip densities or to margin test the memory as desired.

The refresh function can be implemented with a variable priority suchthat the refresh request is initially posted to the memory controller127 as the lowest priority request. Only if the needed memory bank isidle and the memory chips' input/output (I/O) pins would otherwise beunused will the refresh-read operation be executed. After a certainamount of time passes, such that a particular refresh operation musttake place so that another refresh operation can be scheduled to staywithin refresh-timing requirements, will the priority of the refreshrequest be raised so that it takes place with certainty. After a refreshoperation is done nothing need be done until the start of the nextrefresh interval, unless a data error is detected by the scrub-logicfunction or a spare-bit-insertion sequence is underway.

The refresh-read data returned by the refresh-generation function abovechecks the read data for errors. If a correctable error is found amemory read-modify-write sequence is started to fetch the same dataagain and to repair and rewrite the data back to memory. (Otherembodiments can choose to directly rewrite the corrected data at thetime the error is first detected. This saves a memory reference butwill, in most instances, cause the loss of possible memory cyclesaccording to the amount of time taken to check, repair and make ready towrite the data read. Memory cycles can be lost because any writereference to the word being corrected must be held off. In someembodiments, preferably no reference to the respective memory bank isallowed while the scrub sequence is underway.) The preferredimplementation allows normal requests to take place while the scrublogic is checking for errors, but then makes a new read request if anerror is detected such that an atomic read-modify-write cycle is thenneeded. This takes additional time to perform a repair, but saves timein normal system operation.

The above read-correct-write sequence can be used to fix correctabledata failures that occur due to normal system operations. When a systemor non-refresh data item is found to contain a repairable data failure,the failing address is posted to the scrub logic such that the error isfixed in memory in addition to being corrected as the data is beingreturned to the requesting processor.

An error-history buffer 534. This buffer holds information about datafailures observed over time. Different embodiments will likely specifydifferent parameters here, but such information as the number of errorsthat have been observed, the type of error (single-bit, multi-bit, othertypes), the actual memory address, error syndrome, etc., are some of thekinds of information about data failures that can be usefully saved foruse by higher-level error-control functions. The buffer is likely a FIFO(first-in, first-out) or circular buffer so that older failureinformation is overwritten by newer failures, but could be implementedto fill up according to its implementation, and stop accepting newinformation until the older data is dumped to a higher-level system orthe buffer is cleared/reset. The error history buffer can be used tocalculate the rate of soft errors, the rate of hard or multiple errorsor for other useful purposes. An example of the use of the error-historybuffer is to notify the operating system (OS) of memory errors but notto overwhelm the OS (by constant interrupts at a high rate). In someembodiments, the controller is designed so as to generate, for example,an interrupt indication the first two times that a particular memoryaddress has a data failure. The second interrupt serves to tell the OSthat the error has repeated and so likely needs maintenance. The logiccan read the contents of the memory buffer and, if the number of errorsassociated with a particular failure is greater than two, not generatean interrupt. The parameters here can be fixed or possibly variableusing internal software-writable registers (Memory-Mapped Registers(MMRs), for example, that are writable by the OS and maintenancefunctions).

With a little support in the refresh-scrub function, spare-bit-insertioncapability in real-time with continued normal operation can beimplemented. The controller is given a bit position to insert the sparebit and performs the following procedure:

-   -   a. Start the spare-bit insertion when the refresh counter rolls        over to row 0 and column 0 (lowest address in memory). Logic can        be added if desired such that an insertion sequence can start        immediately, but that should not generally be needed as system        operation is continuing before the insertion sequence is started        and while it is underway. Read memory for the refresh-and-scrub        operation in the normal way at the specified addresses, using        the normal timing.    -   b. As each scrub-read data item is returned from memory, check        for errors, but in addition, always perform a write operation        but using the spare bit in the data path according to the        spare-bit position register. (Some embodiments will need to hold        off memory requests for the requested bank number, or bank and        row number, in order to maintain memory consistency.) As proper        memory data is used when writing with the spare-bit inserted,        the contents of memory are correct as long as they are always        read with the position of the spare bit being taken into        account.    -   c. As time proceeds and the refresh sequence is making its way        through memory, all addresses from address zero to the current        refresh address have the spare bit inserted and all addresses        past that point to the last address in memory do not have the        spare bit inserted. When a normal memory reference is made, the        requested address is compared with the contents of the refresh        counter. If the requested address is equal-to or less than the        refresh counter, the data path is organized so that the spare        bit is used; if the address is greater than the counter, the        data path is used without the spare-bit inserted in the path.        Note this assumes starting from address zero, which is not the        case in some other embodiments. Some embodiments will need to        modify the address-compare logic depending on whether or not        memory row or column bits are more significant address bits.    -   d. When the last location in memory is refreshed, all memory has        the spare bit and the comparison with the refresh counter is        discontinued. Normal refresh-scrub operations are resumed, using        the data path with the spare-bit inserted in the identified        position (to do this, in some embodiments, each of the bits        starting at the identified position is shifted on position, so        the spare bit is used and the identified position is not used).

Overview of MDC 110

In some embodiments, MDC 110 includes two major kinds of components: asingle ASIC (a very-large-scale application-specific integratedcircuit), here denoted as the W-chip 120 (other embodiments include aplurality of chips that together provide the function for such aW-circuit 120), and a plurality of (e.g., twenty, in some embodiments)DDR2 (double-data-rate type two) memory-chip groups 130 (or, in otherembodiments, other types or mixes of types of memory components 130). Insome embodiments, there are multiple less-complex components, generallycapacitors.

Clock signals 222 (there are two required, in some embodiments) aresupplied through the card connector using differential signaling.

As shown in FIG. 1A, a block diagram of MDC 110, and in FIG. 3, whichshows a diagram of the W-circuit internals, the W-circuit 120 hasseveral functions that include:

-   -   (a) Four DDR2 memory controllers 127 supporting 333/667 MHz data        rates to the memory. In the computer system 100 architecture        each controller 127 and its associated memory components 130 is        known as a memory subsection.    -   (b) Four high-speed (e.g., five- to eight-GHz signal rates, for        some embodiments) interface ports 121 using differential        signalling that support full duplex operation. All normal        references, commands and data go through these ports 121. In        some embodiments, the nominal/expected data rate is 5.6 Gbps, or        in other embodiments, other multi-GigaHertz speeds. In some        embodiments, each port can have two or more parallel paths for        increased data throughput.    -   (c) In some embodiments, 512K Bytes of L3 cache 124 implemented        in four blocks (called quadrants) of 128 Kbytes each. Each        quadrant is associated with one of the subsection memory        controllers 127 such that the controller handles all “miss”        traffic for that cache block. Within the cache logic are        functions that support data sharing and coherency for data in        the cache and in higher level (L1, L2) caches of the processors        connected to the interface ports 121.    -   (d) A 4-by-4 crossbar 123 that connects the four high-speed        ports 121 to the cache quadrants 124 and respective memory        subsections (each having a memory controller 127 and its memory        chips 130).    -   (e) A test engine 125 that generates tests for the memory        subsections and for the other paths and functions of MDC        110/W-circuit 120. Test engine 125 can check read data and        capture some read-data results. Test engine 125, along with        other test and maintenance features designed into the logic,        make for a fairly complete and standalone test capability.

In some embodiments, each DRAM controller 127 drives five memory parts130, each being eight-bits wide (a 40-bit data interface). In someembodiments, a second rank of five parts 130 is also supported. In otherembodiments, multiple ranks of chips are provided, with a separatechip-select signal per rank. This needs only one additional chip-selectsignal output from each memory controller 127 for each memory rank inthe chip-group stacks since, if the two-rank capability is implemented,memory chips are, in some embodiments, connected as five stacks of twomemory parts each with almost all pins shared in each stack.

In operation, such a 40-bit data interface is used as 32 data bits,seven SECDED-checkbyte bits and an active spare bit.

In addition, two MDCs 110 can be connected together such that one MDC110 can be used to provide test data and test sequences for the otherMDC 110.

In some embodiments, the W-circuit test engine 125, other maintenancefunctions, and other status and control aspects of MDC 110 and W-circuit120 are accessed through a JTAG port 122 (Joint Test Action Group, IEEEStd. 1149.1) that is available at the card connector pins. In otherembodiments, a Firewire channel is provided and connected as theexternal interface to the MDC 110, and is internally connected to theJTAG control interface 122.

In some embodiments, each DRAM controller 127 drives five memory parts130, each being eight-bits wide, and thus has a 40-bit data interface.In some embodiments, a second rank of five parts 130 is also supported.In other embodiments, multiple ranks of chips are provided, with aseparate chip select per rank. This needs only one additionalchip-select signal output from each memory controller 127 for eachmemory rank in the chip-group stacks since, if the two-rank capabilityis implemented, memory chips are, in some embodiments, connected as fivestacks of two memory parts each with almost all pins shared in eachstack.

In operation, each 40-bit data interface is used as thirty-two databits, seven SECDED (single-bit error correction, double-bit errordetection) checkbyte bits and an active spare bit. When being tested,memory can be accessed like that or alternatively or additionally can beexercised as a simple 40-bit interface.

Test Overview

A basic feature for the test design of MDC 110 is that the card istestable with almost no support needed externally, except for connectionto a controlling JTAG (or Firewire or other similar or suitable channel)interface, two clock sources, and some routing on the connector thatprovides power in addition to connections to the clocks and maintenancewiring, at a minimum. In an MDC 110 testing environment, wiring forinterface port loopback tests should be provided, for example as shownin FIG. 2B. In some embodiments, the SerDes interface logic is largelyself-testing as is shown in FIG. 2D. The W-circuit Test Engine (WTE) 125provides for complete testability of the all chip functions (includingthe SerDes interfaces if needed) but the L3 cache, the memorysubsections, and the remainder of the chip have significant built-infunctional checking that is very useful in MDC 110 testing. For example,in some embodiments, both the cache and the memory subsections haveSECDED data checking, the cache-coherency logic flags erroneoussequences, etc.

The test design will also support using one MDC 110 to test another.Doing this means a more complex test fixture in order to have the pairof cards connected together, for example as shown in FIG. 2A. The resultis that memory cards are testable without the need to interface a logicor memory tester to the high-speed ports 121. This operation mode stillrequires use of the JTAG interfaces of both cards to control and statusthe test operations. When the cards are connected together, data on onecard is used to test the other. In some embodiments, the card-to-cardtest will stress full memory bandwidth.

Software support is required to drive the JTAG interface and to make useof the test capabilities of the card. In some embodiments, an interfaceis provided between a standard channel such as Firewire, IEEE Std. 1394and the JTAG pins of W-circuit 120 because a connection is required to amaintenance or control processor 220 will, in some embodiments, requirethe interface chip for operation and maintenance of computer system 100.

In some embodiments, loopback connections for the high-speed ports 121using the test fixture enable the ports 121 to be tested at full datarates without test or tester connections to the ports 121. The portinterface transmitters and receivers automatically synchronize togetherand then pass test data back and forth as part of each port'sinitialization sequence, indicating that each port is ready for use. Inaddition, the WTE can generate and receive test operands for theinterface ports 121 using the test fixture's loopback wiring. Thesetests can use test-specified or pseudo-random data patterns. The sametest sequences can be done using an internal loopback capability at eachport's IO pads (See FIG. 2D) but that does not exercise that portion ofthe board wiring or edge connector pins.

In some embodiments, the WTE is a basic microcode sequencer that isdesigned to generate requests and accept responses from the internallogic and memory functions and can check the returned data. Thesequencer is loaded with tests consisting of commands, address sequences(including looping capabilities), test data and expected result dataaccording to the needs of the test to be performed. The test engine 125is very flexible so that a diagnostic or test engineer can directlyspecify needed test functions and sequences. Test sequences of almostunlimited lengths can be generated.

In some embodiments, the test data width is controllable so that datafunctions with and without accompanying SECDED ECC can be tested easily.The WTE also can generate tests with pseudo-random numbers and check theresults of tests using that data. The number of different test-dataoperands and expected-data results are typically bound by buffer sizelimits.

The L3 cache can be tested specifically by the test engine 125 and canbe used to help test the DRAM memory subsections. When testing thesubsections, test data can be placed into the cache through the JTAGport or can be written to the cache by the WTE. A test sequence in theWTE can then generate requests to the cache that cause cache data to bewritten to the subsection memory. Subsequent WTE requests can cause thatdata to be read and checked. The benefit of doing this, as the cache issmall with respect to the memory in each subsection, is that full memorybandwidths can be generated so as to check for data and timinginteractions and for other transient issues.

Each of the logic functions in W-circuit 120 chip has several associatedMMRs (Memory Mapped Registers). The registers control and configure therespective logic. Also, if a function has status (such as a memorycontroller 127 provides information on SECDED errors), that informationis recorded in local MMRs. All MMRs can be accessed and controlledthrough the JTAG interface.

Some errors detected by normal logic functions can indicate the need forsupport, recovery or reconfiguration by the operating system ormaintenance processor, for those cases data packets can be generated bythe normal logic functions that become interrupt requests in normalsystem operation and can provide expected interaction that helps verifycorrect operation of MDC 110 functions. All interrupts can be enabledand disabled by setting control bits in MMRs.

In normal use, system data paths are 64 data-bits wide and areconsidered as having a single 8-byte data item or two 32-bit data items.At the memory, the data path is 40-bits wide to support 32-bit dataitems, ECC (the error correction code data) and the spare-memory-bitpath. In some embodiments, in order to enable full testing of the memorychips, all needed paths in W-circuit 120 support 40- and 80-bit datawidths.

Of course the high-speed processor ports 121 are narrower—four bits ineach direction for some embodiments. However, the SerDesassembly/disassembly process allows for interface data packet elements(called flits in packet parlance) to support data that is 32- and64-bits wide. In addition, the interface supports 40-bit wide dataelements in test mode, in which 40 of the 64-bit data items hold testdata.

Functions of the Memory Controllers 127 that Affect Test and Maintenance

A simplification for some embodiments of the controller 127 is thatindividual byte-enables are not used. For those cases, at each datastrobe, all 40 data bits are used or they are all skipped. Also, in someembodiments, there are no power-down or sleep modes supported in memoryand there are no chip self- or auto-refresh functions. Each controller127 generates distributed refresh functions using normal memoryreferences and uses the returned data to accomplish background memoryscrubbing. (If the refresh data has an error, a memory write cycle isscheduled to put correct data back in memory, if that is possible forthose embodiments.)

For some embodiments, each memory controller 127 can only accept memoryrequests that result in 16-byte/burst-of-four or 32-byte/burst-of-eightdata transfers to/from memory. All references close the banks in thememory parts at the completion of that operation for those embodiments.In some embodiments, there is one maintenance case where one MDC 110 isbeing used to source test sequences to another card in which whole rowsfrom the memory banks are transferred. This function is typically notused in normal system operation.

The same logic that detects and fixes data being scrubbed can be used torewrite correct data back to memory when a correctable error occursduring normal user operation, in some embodiments. (Most systems usingSECDED or more powerful error-correction schemes fix the data beingreturned to a user but leave the data bad in memory. This can accumulatesoft errors in memory and result in multi-bit, uncorrectable errors.)

For some embodiments, each controller has 7-bit SECDED and an activespare bit along with the normal data path of 32 bits. In test modeeither 32-bit (letting the controller control the other eight bits), or40-bit data can be written and read. In 32-bit mode, checkbytes aregenerated and checked and the position of a data bit to be replaced bythe spare data-bit can be specified. The WTE can exercise and test thislogic.

For some embodiments, each controller is designed to maximize memorybandwidth by allowing memory requests to go out of order and by groupingread and write operations such that bus turn-around losses are reduced.The reordering takes place with respect to the memory banks of thememory chips so that multiple requests for the same bank stay in order.If the oldest request is for bank 0, but that bank is busy, use afollowing request to start another memory operation for a bank that isnot busy. The reordering function can not be turned off in someembodiments, but can be controlled and used by specifying what addresssequences are generated when generating address sequences for testing.The test engine 125 can check returned data without being dependent ondata ordering. Each memory request has a transaction identifier (TID)that is used to establish correspondence between particular requests anddata being returned in response to the requests by returning the TIDwith the corresponding returned data items.

Each controller can be driven directly from the JTAG interface for amore direct memory access though this capability does not support testat high data rate (in some embodiments, four MBytes/sec or so).

The spare bit capability mentioned above allows an otherwise unused bitin the data path to memory to substitute for any of the other bits. Thusthe memory interface is functionally 39 bits wide and the 40th bit canbe used in place of any of the other 39. It is expected that the sparewill generally be used to avoid “stuck” bits in memory though it is alsouseful for some failures like broken nets and pins and similar faults.

In some embodiments, there is a “memory degrade” option that allowssystem operation to be restarted in the presence of failing memorycomponents. When the degrade option is activated, two of the four memorycontrollers 127 support all four L3 cache quadrants. The degrade optionallows either the even or odd numbered controllers to be used, with theother pair idled. This reduces the memory size and the memory bandwidthby half but allows users to continue to use the processors whoseassociated memory has failures. The degrade paths must be tested as partof the verification testing of MDC 110.

The controller design supports multiple memory-chip densities andvarious memory timing and functional variations, in some embodiments.These functions and modes are controlled by on-chip registers and can beexercised and tested by the test engine as desired. The memorycontroller, in some embodiments, also supports multiple different kindsof atomic memory operations (AMOs) like add-to-memory functions forexample. These read-modify-write functions can also be exercised andtested by the test engine 125.

Test and Maintenance Functions of the Processor Ports 121

In some embodiments, when a SerDes receiver (SerDes-in 341 portion of aport 121) is powered up or when the receiver loses link synchronization,the receiver automatically goes into a “training” mode where it expectsto receive a timing sequence so that clock and frame sync can beestablished or recovered. When the output logic of a SerDes port 121 isinitialized, each bit-serial driver puts out a data sequence thatenables the corresponding receive logic to acquire both clock and framesynchronization. After the frame-sync interval, a test-data sequence isgenerated and processed to verify each link's functionality. If thatsequence is done correctly the receiver becomes ready to accept normaldata traffic.

In order for things to remain in sync, each output constantly sends datapackets. If there is no port information to be transmitted at the timeeach packet is sent, a null packet is formed and transmitted. Status inboth the transmitter and receiver indicate how things are going. Thismeans that, for example, if a net or connector breaks, reading thestatus MMR of the receiver indicates that the receiver has dropped outof clock sync and is not detecting any input.

In normal use data is “packetized” to enable detection and recovery fromerrors. Each packet has ECC for data checking and has a packet ID sothat error packets can be identified. As packets are received the ECC ischecked. If all packets in a frame are received correctly, anacknowledgement is passed back to the transmitter. This enables thetransmitter to keep sending more packets. There is a maximum number ofpackets that can be sent without being acknowledged. If an error isdetected, no acknowledgement is returned. The transmitter will time out(in some embodiments, the timing is adjustable) and, by knowing the lastframe that was successfully received at the other end, will startretransmitting the failed frame packets. Status is kept and another MMRhas a limit on the number of retries that will be attempted beforegiving up.

There are some other test functions that test that the packet errorchecking and packet retry functions work correctly. The functions are,in some embodiments, able to be controlled directly from on-chip MMRsand so do not require the WTE, though the test engine 125 can provideadditional testing, if desired.

In some embodiments, any errors detected in the SerDes interface and inchecking the packet data is recorded in status MMRs and are available atall times.

As was stated before, in some embodiments, logic associated with eachSerDes port (the LCB or Link Control Block) can generate a pseudo-randomdata sequence that can be sent and checked at the receiver. This isnormally done as part of the initialization sequence. This means that,in some embodiments, no additional direct test capability is needed fromthe WTE or from other tests specifically directed at the interfaceports. Of course the ports will be exercised by data passing through theports, as when one memory card is being used to test another card. Errorchecking and recovery is enabled and used for these cases.

The transmit/output and receive/input sides of each SerDes port areindependent enough that a single loopback connection can verifyfunctionality using the functions discussed above. There is amaintenance function to activate this loopback connection at the pins ofW-circuit 120.

Test and Maintenance Functions for the L3 Cache and Associated Logic

In some embodiments, the L3 data cache has SECDED circuitry on a 32-bitbasis. Like the DRAM interface, data can be written and read in thismode and also in a 40-bit mode so that the memory underneath the datacheckbytes can be easily tested. This would normally require that thecache support 39 bits, but 40 bits of data width are provided so thatthe data items in the cache can be used as full-width test operands forthe memory subsections.

Associated with each cache line (32 bytes per cache line, in someembodiments) is an address. The address is used when memory requestsarrive from the processors to see if the requested data item is presentin the cache so that a subsection memory reference can be avoided. Theaddresses for all the cache lines are grouped together into a Tag RAM.Each entry in the Tag RAM is the address for the data of one cache line.In addition to the address data in the Tag RAM, sharing and coherencystate data for each line is also stored. This information is used todetermine data “ownership” and sharing properties.

In some embodiments, the Tag RAM is protected by its own SECDEDcheckbyte. The logic and memory associated with the checkbyte are notdirectly testable but have a maintenance function, discussed below, thatenables full test of the associated functionality. The coherency logicis tested with specific test sequences from the WTE. Built into thecoherency logic are illegal sequence detectors (like trying to evict thesame item twice in succession) that help in the testing of thesefunctions, in some embodiments.

The “way-compare” logic in the cache (in some embodiments, sixteencomparators that see if a request address matches one of the addressesin the Tag RAM) is tested by storing specific addresses in the Tag RAMand then generating a memory request (usually from the WTE) and seeingif data is returned from the cache or if a memory-get request isgenerated to the memory controller 127 (indicating that no address matchwas found).

Each quadrant of the L3 data cache is “more or less” testable as arandom-access memory when put into a specific test mode. At the sametime and using the same test mode, the other sharing and coherency logicis driven by the same sequence (read and write operations) and sendsresponses to the WTE for checking. The “more or less” comes from thefact that the multiple cache entries at a single address index (the“sixteen ways”) are distinguished by the requirement that the address ineach respective Tag entry must be different and the way-compare logicindicates that a particular “way” has the data cached for a particularaddress and self identifies. In some embodiments, there is no mechanismto say “read the data item that resides in ‘way-3’ for the followingaddress/index.” In a test mode the individual ways can be identified,but again, without knowing a “real memory address.” In some embodiments,from the WTE, data can be written to specific ways and memory indexes;this is equivalent to having a memory address. When data is being readfrom the cache, the address compare logic chooses a way that matches therequested address and returns the correct data without ever having aspecific read address. In some embodiments, the JTAG path can read andwrite specific cache locations but at a lower bandwidth than can besustained by the WTE.

Testing of the SECDED checkbyte generation, memory, syndrome generation,and data correction functions of the Tag RAM are accomplished with thefollowing test:

-   -   The storing of a checkbyte value in Tag RAM when an entry is to        be written can be blocked. The resulting zero checkbyte value is        the same as if the data entry being stored is all-zero. In other        embodiments, a non-zero checkbyte value is used for all-zero        data items, in order that a failure that causes all bits to be        zero will be detected. For those embodiments, that non-zero        checkbyte value is forced rather than the all-zero value.    -   Store a set of single sliding-one bit values into the Tag RAM.        As each entry is read back the returned value should be        all-zeros and the status MMRs will indicate the bit position of        the 1-bit that was stored. Data values to cause other single-        and multiple-bit errors can be stored and read in order to fully        check the read checkbyte, syndrome, and correction logic.        Depending on the likely faults (failure modes that are more        probable than others), a sliding-zero sequence is used for some        embodiments.    -   Once the read checkbyte logic is verified, the write logic must        be working if no errors are reported in normal and test        operations.

The cache is also used in testing the DRAM memory. When this is done,data to be written to the DRAMs is stored in the cache. The WTEgenerates AMO (or other) references that cause data to be written to theDRAMs in the associated subsection. Data can be subsequently read byhaving the WTE generate normal memory reads for the same addresses. Insome embodiments, using AMO (atomic memory operation) references allowsfull memory bandwidth to be generated and does not require that thedetailed structure of the cache be understood in order to generateuseful test sequences. (By way of explanation: in some embodiments, AMOoperations take place in each memory controller 127; any cache data mustbe forwarded to the controller so that can take place. The memorycontroller 127 writes the data to memory as part of AMO functionality.)

Other Test and Maintenance Functions

In some embodiments, the W-circuit 120 has a capable internal test-pointmonitoring capability. Commands are sent to the logic monitor to choosewhat test points to monitor and to select a triggering condition. Theselected testpoint data is saved in a buffer memory for observationlater.

The trigger condition can start or stop data recording. If the triggercondition mode stops testpoint data recording, data recording is startedwhen the mode is selected and runs continuously—the testpoint databuffer is circular—and is stopped when the trigger condition occurs. Asa result, data in the testpoint buffer looks backward in time as thecondition that generated the trigger condition corresponds to the lastentry in the buffer. If the trigger condition mode is to start recordingtestpoint data, than data recording is started when the triggercondition occurs and is stopped when the buffer is full. Data in thebuffer is then later in time than the triggering event. This capabilityhas proved very useful for low-level debugging and fault-finding.

The JTAG scan logic has full access to all memory-mapped registers whichhold configuration information and control and receive status from allmajor logic functions in the IC. This includes system level operationsas well as maintenance and diagnostic functions.

Functions of the W-Circuit Test Engine 125

The WTE (W-circuit test engine) 125 is connected into the chip's logicas shown in FIG. 2E. It has access to all data coming into and leavingthe chip both from the processor ports and from the memory subsections.The test engine 125 is used to generate tests and to check results whentesting the L3 cache and coherency logic and when testing the memorycontrollers 127 and the DRAM parts 130. The test engine 125 is used toprovide address generation when one MDC 110 is testing another and isused, in some embodiments, in the card being tested to check testresults. In addition, for some embodiments, the WTE can be used togenerate tests for, and to observe results of testing the high-speedports 121 when the ports are configured in any of the various loopbackfunctions or modes.

The test engine 125 is controlled and results observed through MMRregisters that are accessed through the JTAG port. In addition, in someembodiments, the test engine 125 can be used in other system testoperations, for example by generating test data packets that can be sentto the processors for diagnostic functions.

The logic of the test engine 125 consists of two major components: asequencer 346 (e.g., one that is controlled by microcode stored in theW-circuit) which generates tests and a result test checker 347. A blockdiagram of the sequencer is shown in FIG. 2F.

In some embodiments, the Test Generation logic has the following majorfeatures and subcomponents:

-   -   A small (in some embodiments, 32 entries are provided) Test-Data        memory buffer. Entries are used as the data source for data        being written to memory, to the cache, and for test data needed        for testing of any other logic functions. Data in this memory is        written to the buffer memory by using the JTAG path as part of        entering a test sequence into the test engine 125. In some        embodiments, the capability is provided to specify that the        complement of the data in the buffer should be used instead of        specified stored test operand.    -   In some embodiments, one or more memory-address generators        (e.g., one or two) have separate portions for row, column, and        bank. The register holding the current address can be entered        whole or can have any of the 3 portions incremented/decremented        by a small bit field. The idea is to specify increments from a        last value starting from some fixed address. This avoids the        requirement for a loader function (to relocate addresses for        different memories or when executing a test sequence from a        different starting point than the original address). Doing this        also will greatly reduce the number of entries in the microcode        memory and so reduce time to load test sequences. The address        generator function is also used when testing the L3 cache.    -   One or two loop counters are provided for some embodiments. A        bit from the microcode control memory indicates to decrement a        counter. If the count is zero the next command is the next        sequential entry in the sequence memory. If not zero, the entry        in a “loop back” field in the microcode memory is used to adjust        the address of the next entry taken from the sequence memory.        (This field should be a relative offset also.) The loop counters        can be loaded as needed from the microcode memory.    -   A microcode memory (in some embodiments, for example, fifty bits        in width by 256 addresses). The contents of each data entry        consist of several fields, each of which control some specific        function or data item.    -   A. One or more bits to indicate that the loop counter(s) 314        should be decremented and tested.    -   B. A “Loop Back” field (in some embodiments, four bits) to        indicate address offset for top of loop address.    -   C. Three fields to indicate how the current row, column, and        bank address should be adjusted for the memory reference that        will be made following the current reference. These fields will        likely have additional functions of holding a memory address to        be loaded and as loop counts.    -   D. A small microcode command field that indicates that the        current sequence entry is used to load the address or loop        counters directly, so that the sequence fields become catenated        and an immediate value. “Halt” is likely one of the commands.    -   E. A memory command field (in some embodiments, six bits) that        is the memory function specification: read, write, AMO, and some        of the parameter bits (allocate/no-allocate, exclusive/shared,        etc.).

When the WTE is running a test, the different registers needed for thetest and the contents of some of the fields in the sequence memory areused to built a request packet—write at the following address using aspecified data item from the test data buffer, for example—and sent offfor execution. Each packet is given an identifier, called a TID (forTransaction IDentifier), that is most importantly used when data isreturned as a result of a data read request. The Result logic keeps apointer to the expected data in association with the TID. This meansthat data checking is not dependant on the order that data is returnedfrom memory.

The Test Result logic is shown in FIG. 4. It has an Expected Resultbuffer memory to hold data that are used to compare with test data beingreturned from the logic or memory function being tested. In someembodiments, there is also a small (in some embodiments, one KByte)memory buffer that can save test results for external observation asneeded.

All the needed “meta” controls for the WTE test functions—indicating,for example, to the crossbar logic that 40/80-bit data paths arerequired instead of 32/64-bit paths or that the test sequence is for theL3 cache rather then the DRAM memories—are MMRs that are controlled viathe JTAG scan logic.

The WTE also has the ability to generate requests to the memorysubsection controllers that result in a stream of data being dumped tothe processor ports. The data stream becomes a sequence of memory readand write requests to a connected unit-under-test. A test mode set inthe memory controllers 127 causes whole memory rows to be read atmaximum bandwidth. This function is used on the Gold unit when it isgenerating test streams for use in testing another MDC 110.

Among several other functions that can be useful in support of systemoperation, debugging, or checkout, it is, in some embodiments, very easyfor the WTE to change the ECC checkbytes in memory in the followingways: 1) pass through memory making the data checkbytes correspond todata stored there and 2) pass through memory storing invalid checkbytevalues. The first function allows corrupt memory to be accessed and thesecond is intended to generate an interrupt when a program accesses datathat has not been subsequently validly initialized; this is useful insoftware program debugging.

The test engine can also be used, in some embodiments, in normal systemoperation, for example by zeroing-out newly allocated memory pages as ahelp to operating system allocation routines.

Using one MDC 110 to test another

When one MDC 110 tests another, one card (the golden unit) is a masterand is used to provide a stream of requests to the MDC unit under test.The following is done:

-   -   Data is stored into any or all of the memory subsections of the        gold unit that correspond to subsections of the unit-under-test        that are to be exercised using the JTAG path to provide the data        in preferred embodiments.    -   The unit-under-test is configured for normal operation, except        that read-data checking and data path widths are enabled as        needed. Also, the Expected Data buffer is loaded so that data        checking can be performed.    -   The WTE in the gold unit is given a starting address and an        address range/length. The WTE generates incrementing, full row        read requests so that ordering within the resulting data stream        is fully deterministic. The crossbar logic sends the requests to        any identified quadrant and subsection that is to be tested        resulting in a data stream at each port corresponding to the        memory subsections that are to be exercised. In some        embodiments, the memory references are broadcast to all memory        controllers 127 at the same time to exercise the UUT more        completely and at higher total bandwidth.    -   The streams coming into the unit-under-test see are seen as a        series of read and write requests that are executed. In general,        each streams addresses should be restricted so that each port's        requests do not get sent to a different subsection than that of        the requesting port number. The issue here is not that the read        or write operations will not be done correctly but that the        ordering of operations can change because of interactions        between the multiple requesting streams. (Each interface port is        separately re-synced to the memory and logic clock by the SerDes        logic. This generally makes ordering of one data stream with        respect to another nondeterministic.) Some read data can be        saved in the WTE result buffer and observed externally if        needed, though result data reordering must be considered in        observing the data returned, in some embodiments.    -   The Test-Result portion of the WTE of the unit-under-test is        used to check that data read from the memory of that unit is        correct. This means that the Expected Result data buffer must be        loaded through JTAG scan path before the test starts. The Build        Test Packet logic of the WTE test generation function is used to        scan the request data stream from the gold unit to enable        association of read requests to the contents of the Expected        Result buffer. Note that, in some embodiments, none of the data        read back from the memory of the unit-under-test leaves that        unit while the test is underway, though some embodiments might        well pass the data back to the gold unit for testing.

In this mode, the memory controllers 127 always reference and send outwhole rows from the memory. If the test ends before the last data in arow, the test data generator must pad the end of the sequence withnull/empty packets, in some embodiments.

The request data stored in the memory of the gold unit must be properlyformatted data packets. In some embodiments, data within the testsequence can be normal 32- and 64-bit data or it can provide 40-bit dataitems in the data portion of the request packets. For some embodiments,a single test stream must not mix 32/64 bit data requests with 40-bitdata requests. The 40-bit data format allows memory normally holding ECCdata bits to be tested as normal memory with full control over thestored data bits. This 40-bit mode will not exercise full memorybandwidth however, in some embodiments. When in 40-bit mode, all memoryrequests must be for 16-byte data items (a single burst-of-four for eachmemory subsection when using DDR2 SDRAM memory), in some embodiments.

About the Memory Mapped Registers (MMRS) in W-Circuit 120

All MMRs are loaded and unloaded through the JTAG scan path, in someembodiments. All control functions including master clear andinitialization functions are done through on-chip MMRs. Internal statusfor all functions is available in the requisite MMRs. The internalmemory blocks including the L3 data and Tag/coherency memories and thetest point buffer can be written and read through the MMR accessmechanism.

Each MMR or memory function is assigned an address or an address range.In the JTAG scan port there is a register that can be loaded with theneeded address; there is also a function register is that is loaded atthe same time. If the function is writing, data follows the address inthe serial data stream. If the function is reading, the data from theaddressed entity is driven from the scan output. The result is quickaccess to any needed function, status register, or data memory andavoidance of long scan chains when accessing the MMR functions.

When the IC is powered up or is given the lowest level of master clear,all MMRs are loaded with default values, in some embodiments. While someof the defaults will likely never change except for some of themaintenance functions (enable coherency in the L3 cache, for example),others will become obsolete and will always change; for example, when4-Gbit memory parts become available the memory size default for 1-Gbitmemory parts will, in some embodiments, never be used on new systemsfrom that point onward. For some embodiments, the scan port in W-circuit120 can run at any frequency from dc to 50 MHz.

Using the Test Functions in MDC 110/W-Circuit 120

In some embodiments, test sequences will follow the same basicoperational steps:

-   -   A. Load needed MMRs for needed configuration functions: Any        configuration difference from the default or current state is        loaded at this time. This can include disabling ports or other        functions as needed.    -   B. Load and control MMRs for needed initialization or training:        The SerDes ports must go through an initialization sequence.        Similarly, there will be clock timing adjustments or driver        impedances that must be set in the memory controllers 127 and in        the memory parts 130 themselves.    -   C. Load any data needed into memory blocks that will source data        or information for the test sequence: If the WTE is to be used,        the microcode memory must be loaded and the Test Data Buffer and        Result Data Buffers loaded. For some tests the L3 data and/or        Tag memories must be loaded. When using one MDC 110 to test        another, the memory of the “gold” unit is loaded at this time.    -   D. Start/execute the test: An MMR is written with a “go test”        signal such that the needed test is activated. In most cases the        WTE starts running the test or there is similar capability in        the other test functions.    -   E. Observe the test results: MMRs with result status are        observed. In some cases result data memories or buffers must be        unloaded and observed in some fashion.    -   F. If needed, repeat some or all of the above.

Aspects of Some Embodiments that Include a Memory-Controller Circuit 120that Includes a Self-Tester and/or Test Engine 125 for Other Similar orComplementary Cards

Some embodiments of the invention include a first circuit 120 for usewith a first memory card 110, the card having a plurality of memorychips 130. This first circuit includes a high-speed external cardinterface 112 (also called a system interface 112) connected to writeand read data to and from the memory chips 130, and a test engine 125configured to control the high-speed interface 112 and/or the memorychips 130 and to provide testing functions to a second substantiallyidentical circuit 120 on a second memory card 110.

Some embodiments of the first circuit 120 further include one or morememory controllers 127, each one of the one or more memory controllers127 connected to control a subset of the plurality of memory chips 130.

Some embodiments of the first circuit 120 further include one or morecaches 124; each one of the one or more caches 124 operatively coupledto a corresponding one of the memory controllers 127.

In some embodiments of the first circuit 120, the high-speed externalcard interface 112 further includes a crossbar switch 123, and one ormore SerDes ports 121, each one of the one or more SerDes ports 121connectable through the crossbar switch 123 to a plurality of the caches124.

Some embodiments of the first circuit 120 further include a controlinterface 122, the control interface configured to program the testengine and to initialize, control, and observe test sequences.

In some embodiments, the invention includes a system 200 for using afirst memory card 110 to test a second memory card 110, the system 200including a test fixture 210 having a first interface 219A connectableto the first memory card and a second interface 219B connectable to thesecond memory card, such that at least some inputs from the firstinterface are connected to corresponding outputs of the secondinterface, and at least some outputs from the first interface areconnected (via connection wiring 230) to corresponding inputs of thesecond interface, and a test controller 220 operable to sendconfiguration data to the first interface to cause a testing function tobe performed when suitable first and second memory cards are connectedto the fixture.

In some embodiments, the first interface connects each of one or morehigh-speed SerDes port of the first memory card 110 to a correspondingSerDes port of the second card 110.

In some embodiments, the test controller 220 receives test results fromthe first memory card 110 indicative of functionality of the secondmemory card 110.

In some embodiments, the test controller 220 includes an interface 219(or 219A and 219B) to send and receive data from respective controlinterface ports 119 of the control interfaces 122 on the first memorycard 110 and the second memory card 110.

In some embodiments, the test controller 220 is operable to configurethe second memory card 110 to each one of a plurality of differentoperation modes.

Some embodiments of the test system 200 further include a testcontroller connection 219 to both the first and second memory cards.

In some embodiments, the invention includes a method for testing memorycards, the method including connecting a plurality of interface lines ofa first memory card to corresponding complementary interface lines of asecond memory card, configuring the first memory card to be operable toperform testing functions, configuring the second memory card to beoperable to perform normal read and write operations, and testing thesecond memory card under the control of the first memory card.

In some embodiments of this method, the configuring of the first memorycard includes loading microcode into the first memory card.

In some embodiments, the invention includes a first memory card 110 thatincludes a plurality of memory chips 130, one or more high-speedexternal card interfaces 121, including a first interface 121 and asecond interface 121, each connected to write and read data to and fromthe memory chips 130, and a test engine 125 configured to control thefirst high-speed interface 121 and the memory chips 130 in order toprovide testing functions to the second high-speed interface 121.

In some embodiments of this card 110, the test engine 125 is operable togenerate requests that look like and perform as normal requests to thecard.

In some embodiments of this card 110, the test engine 125 includesinternal paths that enable the test engine 125 to send requests to andreceive results from a plurality of internal chip functions.

Some embodiments of this card further include circuitry that allowsresults to return in a different order than the order in which they weregenerated.

Some embodiments of this card further include a microcode memory thatstores code that controls at least some functions of the test engine.

In some embodiments, the invention includes a computer system 100 or 200that includes a first processing unit 106 or 220, and the first memorycard 110 described above, operatively coupled to the first processingunit 106 or 220.

Some embodiments of this computer system 100 or 200 further include asecond memory card 110 substantially identical to the first memory card110, and operatively coupled to the first processing unit 106 or 220.

In some embodiments of the computer system 200, at least one interfaceport 121 of the first memory card 110 is complementarily connected to arespective interface port 121 of the second memory card 110, and whereinthe first processing unit 220 is configured to load configurationinformation into the first memory card to cause the first memory card110 to perform test functions to the second memory card 110, the firstprocessing unit 220 also configured to receive test results.

In some embodiments of the computer system 100, the first processingunit 106 is configured to load configuration information into the firstmemory card 110 and the second memory card 110 to cause the first memorycard 110 and second memory card 110 to perform normal read and writeoperations.

Some embodiment further include a second processing unit 106, a thirdmemory card 110 substantially identical to the first memory card 110,and operatively coupled to the second processing unit 106, and a fourthmemory card 110 substantially identical to the first memory card 110,and operatively coupled to the second processing unit 106.

Other embodiments of the invention include a first memory card 110 thatincludes a plurality of memory chips 130, a high-speed external cardinterface 112 connected to write and read data to and from the memorychips 130, and a test engine 125 configured to control the high-speedinterface 112 and/or the memory chips 130 in order to provide testingfunctions to a second substantially identical memory card 110.

Some embodiments of card 110 further include one or more memorycontrollers 127, each one of the one or more memory controllers 127connected to control a subset of the plurality of memory chips 130.

Some embodiments of card 110 further include one or more caches 124;each one of the one or more caches 124 operatively coupled to acorresponding one of the memory controllers 127.

In some embodiments of card 110, the high-speed external card interface112 further includes a crossbar switch, one or more SerDes ports, eachone of the one or more SerDes ports connectable through the crossbarswitch to a plurality of the caches.

Some embodiments of the first memory card 110 further include a controlinterface, the control interface configured to program the test engineand to initialize, control, and observe test sequences.

Another aspect of the invention in some embodiments provides asingle-chip memory-support circuit 120 that includes a system interface112, a memory interface 113 operable to generate read and writeoperations to a memory 130, wherein the circuit 120 operates to providedata from the memory interface 113 to the system interface 112, and atest engine 125 operatively coupled to control the system interface 112and the memory interface 113 in order to provide testing functions. Insome embodiments, the testing functions are programmably configurable,i.e., they can be controlled by information that is loadable into thetest engine. Since this control information is loadable, it can bechanged to enable testing of various conditions that perhaps could notbe anticipated early in the design phase.

Some embodiments of card 110 further include a control interface 122,wherein testing configuration information is loadable through thecontrol interface 122 into the test engine 125 to provide theprogrammably configurable testing functions.

Some embodiments of card 110 further include a cache operatively coupledto the memory interface and the system interface to provide cached datato the system interface.

In some embodiments, the test engine includes a test-generationfunction; and a test-result-checking function, wherein results can bereturned and checked in an order different than the order in which theywere generated.

Another aspect of the invention in some embodiments provides aintegrated-circuit chip that includes an input-output port; and a testengine operatively coupled to control the input/output port such thatfunctionality of the input/output port can be tested by connecting theinput/output port to a similar port of another chip and sending testcommands to and receiving test results from the other chip's port.

In some embodiments of this chip, the testing can be performed withoutregard to the electrical and architectural implementation of the ports.

Some embodiments of this chip further include a memory interfaceoperable to generate read and write operations to a memory, wherein thecircuit operates to provide data from the memory interface into theinput/output port.

Some embodiments of this chip further include a control interface,wherein testing configuration information is loadable through thecontrol interface into the test engine to provide testing functions.

Some embodiments of this chip further include a cache operativelycoupled to the memory interface and the input/output port to providecached data to the input/output port.

Some embodiments of this chip further include functional logic on thechip; wherein use of the test engine is independent of operation of thefunctional logic.

Some embodiments of this chip further include functional logic on thechip; wherein use of the test engine is independent of and testsoperation of the functional logic.

In some embodiments, the test engine generates a plurality of tests inorder that two or more simultaneous functions of the functional logicare tested at the same time. For example, testing cache and causingheavy memory traffic, by requesting lots of data that is not in thecache, which in turn causes additional memory operations to fill thecache. In some embodiments, the WTE 125 can stimulate the crossbar 123with a broadcast function requesting, for example, four pieces of datasimultaneously. In some embodiments, the results checker 347 providessimultaneous checking of up to four results.

In some embodiments, various functions provided by the test engine arealso used in normal operation. For example, the test engine provides afast, efficient, and easily programmed way to provide additionalfunctionality to the MDC 110 for normal operation, such as the abilityto zero a block of data, or to fill data patterns that are recognizableas invalid data (such functions could be, but need not be, associatedwith allocation of memory blocks). In some embodiments, a user requeststhe operating system (OS) (e.g., of processor 106 of FIG. 1A) to givethe user additional memory space (e.g., allocate data for a memory pagerequest), and the OS returns with a pointer (an address) to the data forthe user, and the OS has initialized, or has arranged to have thehardware initialize, that data area to zero. In some embodiments, theWTE 125 is programmed to perform the zeroing of the block of allocatedmemory upon receiving the proper command from the OS.

The WTE 125 is also useful for debugging, in some embodiments. Forexample, the user sees that some program is making a memory reference toan address that is considered out of bounds, and the program is crashingthe operating system, but due to the large number of different programsthat are multitasking in the computer system it is very difficult totell which program is making the out-of-bounds memory request, or wherein the program. Thus, in some embodiments, the WTE 125 is used toinitialized some or all unused memory with a particular data patternthat is never validly usable by normal code (e.g., in a memory withSECDED error-correction code, this could be a pattern of all zeros inthe normal 32-bit data field, and with a pattern of data in the field oferror-correction bits (the seven or eight extra bits that are used forerror correction) that indicates a two-or-more-bit uncorrectable error).Upon receiving the command to initialize memory, WTE 125 would gothrough the memory-allocation block and initialize that piece of memorythat is going out of bounds with the predetermined special data pattern(which gives an uncorrectable error indication when accessed as normalmemory). Thus, when the user accesses that area (e.g., the area beyondthe end of a defined array), they get a multiple-bit error due to theinitialization done by WTE 125. When a user's program is exceeding thebounds of an array, the multiple-bit error pattern is read from past endof array, and the W-circuit 120 recognizes and reports the “corruptdata.”

In some embodiments, there is an interrupt generated by the W-circuit120 for multiple-bit errors that are detected. In some embodiments, eachmemory controller 127 performs SECDED error correction (generates theECC bits on data being written, and checks and corrects correctableerrors, and reports uncorrectable errors). WTE 125 can cause writes of40-bit data (of any arbitrary pattern, including patterns of data andECC bits that should be detected as indicating one or more errors, andthese should be distinguished as single-bit errors or multiple-biterrors), rather than 32-bit data plus SECDED, as is written from thenormal write if data from a system processor. In some embodiments, theinterrupts to report errors go through the normal data path through thehigh-speed serial ports, and the error gets reported back by aninterrupt-request packet to inform the OS that this or that errorhappened.

In some embodiments, all requests have TID (Transaction IDentifier) tagsthat are sent to MDC 110 with each request, and then when the data areretrieved, they are returned with the corresponding TID to identify tothe processor which request this data belongs to. If an error isdetected, the error return includes the corresponding TID, along with anerror-reply flag (indicating an error in the request, MDC 110 unable tosatisfy with the proper data). The OS is told which card and whichmemory controller 127 detected the error.

In some embodiments, another aspect of the invention provides a systemfor testing a first memory card. This system includes a test fixturehaving a first interface connectable to the first memory card, such thatat least some inputs of the first interface are connected tocorresponding outputs of the first interface, and a test controlleroperable to send test configuration data to the first interface to causea testing function to be performed by the first memory card whenconnected to the fixture.

In some embodiments, the first interface connects one SerDes port of thefirst memory card to another SerDes port of the first memory card.

In some embodiments, the test controller receives test results from thefirst memory card indicative of functionality of the first memory card.

In some embodiments, the test controller includes an interface to sendand receive data from a control interface port on the first memory card.

In some embodiments, the test controller is operable to configure thefirst memory card to each one of a plurality of different operationmodes.

1. Aspects of some embodiments that include a read-refresh mode,scrubbing, Variable Rate

Some embodiments of the invention provide a memory daughter card (MDC)having one or more memory controllers that each provide a read-refreshmode of operation, in which every row of memory is read within therefresh-rate requirements of the memory parts, and different columnswithin the rows are read on subsequent read-refresh cycles, thus readingevery location in memory at regular intervals (e.g., depending on thememory configuration and refresh requirements, this can be once everyfew seconds to about once per hour, in some embodiments), and allowingfor checking for correct data using each location's ECC.

In some embodiments, a scrubbing function is also provided andintegrated with the read-refresh operation rather than being anindependent operation. Combining the scrubbing and refresh functions, asused in these embodiments, results in scrubbing memory about once perminute. For scrubbing, after the data bits are checked and if an erroris detected, a subsequent atomic read-correct-write (ARCW) operation isscheduled based on each correctable single-bit error detected during theread-refresh operations (the separate read in the ARCW is done just incase the processor had modified the contents after the error wasdetected but before corrected data could have been written back) tocorrect the affected location.

In some embodiments, refresh timing is variable. In some embodiments, apriority can be varied such that refreshes that have been delayed for along time can be prioritized to a higher exigency.

In some embodiments, an explicit-refresh mode of operation is selectableinstead of the read-refresh mode of operation to improve performance. Insome such embodiments, scrubbing is done independently from refresh(e.g., as an additional operation performed relatively infrequently),such that all locations are scrubbed about once per hour. In some ofthese embodiments, additional read-refresh operations are scheduled forthis scrubbing, in addition to and amongst the explicit-refreshcommands, at a frequency low enough that performance does notappreciably degrade.

In some embodiments, the invention is part of a computer system having,for example: a first plurality of memory cards and a first plurality ofprocessors coupled to the first plurality of memory cards, a secondplurality of memory cards and a second plurality of processors coupledto the second plurality of memory cards, a network operatively coupledbetween the first plurality of processors and the second plurality ofprocessors, and an input/output system operatively coupled to providedata to and from the first plurality of processors.

Some embodiments provide an information-processing apparatus thatincludes a first memory controller, that in turn includes a memory-chipinterface that outputs memory addresses in a plurality of portions,including a first-address portion that is sufficient to refresh a set ofaddresses for a portion of a memory and a second-address portion thatspecifies one or more locations within the set of addresses, and arefresh controller, coupled to the memory-chip interface, and configuredto send read-refresh requests. These read-refresh requests use refreshaddresses that cycle through address bits for the first-address portion(e.g., a row-address portion that is sufficient to refresh the specifiedrow) and also cycle through bits for the second-address portion (e.g., acolumn-address portion that is not needed for refreshing, but doesselect one or more words from memory), and wherein read-refresh resultdata is fetched to the memory-chip interface as a result of each of theread-refresh requests.

Some embodiments provide an information-processing apparatus thatincludes a first memory controller having a memory-chip interface thatoutputs memory addresses in a plurality of time multiplexed portions,including a first-address portion and a second-address portion, amemory-request buffer, coupled to the memory-chip interface, andconfigured to hold a plurality of pending memory requests that aretransmitted to the memory-chip interface, and a refresh controller,coupled to the memory-request buffer, and configured to sendread-refresh requests the read-refresh requests using refresh addressesthat cycle through address bits for the first-address portion and alsocycle through bits for the second-address portion, and whereinread-refresh result data is fetched to the memory-chip interface as aresult of each of the read-refresh requests.

Some embodiments of the apparatus further include an error detector,coupled to receive read-refresh results from the memory-chip interfaceand configured to detect one or more bit errors in the read-refreshresult data, and an atomic read-correct-write (ARCW) controller coupledto the memory-request buffer, and configured, based on detection of anerror by the error detector, to control an atomic read-correct-writeoperation to correct the detected error in a manner that isuninterrupted by other requests that could affect correction of theerroneous data. In these embodiments, the memory-request buffer isconfigured to hold a plurality of pending memory requests, the errordetector detects errors (optionally based on a SECDED or other suitableECC), and the ARCW controller operates to temporarily inhibit requestsfrom the memory-request buffer and to prevent further memory requestsfrom being issued and/or accepted for a period of time sufficient toallow the atomic read-correct-write operation to effectively complete.

Some embodiments of the apparatus further include an error detector,coupled to receive read-refresh results from the memory-chip interfaceand configured to detect one or more bit errors in the read-refreshresult data from an error-affected location, and an atomicread-correct-write (ARCW) controller coupled to the memory-requestbuffer, and configured, based on detection of an error by the errordetector, to control an atomic read-correct-write operation to correctthe detected error in a manner that is uninterrupted by other requeststo the affected location.

In some embodiments, the refresh controller is further configured tosend explicit-refresh requests to the memory-request buffer, wherein theexplicit-refresh requests are sent from the memory-chip interface tocause memory parts to perform an internally controlled refresh function.

In some embodiments, the refresh controller sends a plurality ofexplicit-refresh requests without intervening read-refresh requests overa first period of time, then a plurality of read-refresh requestswithout intervening explicit-refresh requests over a second period oftime, then sends a plurality of explicit-refresh requests over a thirdperiod of time, and then a plurality of read-refresh requests over afourth period of time.

In some embodiments, the refresh controller further includes a timercontroller that allows timing between explicit-refresh requests to bevaried.

In some embodiments, the refresh controller further includes a timercontroller that allows timing between read-refresh requests to bevaried.

In some embodiments, the refresh controller further includes a prioritycontroller that sends a first read-refresh request at an initialpriority value, and later if the first read-refresh request has not beencompleted, increases the priority value.

In some embodiments, the refresh controller further includes a prioritycontroller that sends a first read-refresh request specifying a firstaddress and at an initial priority value, and later if the firstread-refresh request has not been completed, then sends a replacementread-refresh request specifying the first address and at a higherpriority value. In some embodiments, an arbitration circuit is includedat the output of the buffer, and the refresh requests are presentedthere without passing through the buffer, such that the arbitrationcircuit can chose such a refresh request over other requests in thebuffer when the refresh request has the higher priority.

Some embodiments of the apparatus further include a high-speed serialexternal interface connected to receive memory-requests from a processorfor sending to the memory-chip interface, and to transmit data obtainedfrom the memory-chip interface for sending to the processor.

Some embodiments of the apparatus further include a plurality ofhigh-speed serial external interfaces, a second memory controllersubstantially the same as the first memory controller, a first pluralityof memory chips operatively coupled to the first memory controller, asecond plurality of memory chips operatively coupled to the secondmemory controller, and a crossbar switch operatively coupled to transmitand receive memory commands and data to and from the first and secondmemory controllers, and to and from the plurality of high-speed serialexternal interfaces.

In some embodiments, the apparatus is packaged on a single first memorycard.

Some embodiments of the apparatus further include a second memory cardsubstantially the same as the first memory card, a first plurality ofprocessors coupled to the first memory card and to the second memorycard, a third and fourth memory card each substantially the same as thefirst memory card, a second plurality of processors coupled to the thirdmemory card and to the fourth memory card, a network operatively coupledbetween the first plurality of processors and the second plurality ofprocessors, and an input/output system operatively coupled to providedata to and from the first plurality of processors.

Some embodiments of the apparatus further include a first plurality ofprocessors coupled to the plurality of high-speed serial externalinterfaces, a network operatively coupled to each of the first pluralityof processors, an input/output system operatively coupled to providedata to and from the first plurality of processors, and a power supplyoperatively coupled to provide power to the first plurality ofprocessors.

In some embodiments, the first address portion includes address bits fora row of data in a memory chip and the second address portion includesaddress bits for a column of data in the memory chip.

Some embodiments provide an information-processing method that includesbuffering a plurality of pending memory requests from a processor,sending a stream of processor memory requests from the buffered pendingmemory requests to memory parts, inserting a read-refresh requestperiodically into the stream of processor memory requests, wherein theperiodic read-refresh requests are sent using refresh addresses thatcycle through address bits for a row-address portion and also cyclethrough bits for a column-address portion, and fetching data as a resultof each of the read-refresh requests.

Some embodiments of the method further include detecting an error in thefetched read-refresh data (optionally based on a SECDED or othersuitable ECC), preventing further memory requests from starting for aperiod of time, preventing further memory requests from being issuedand/or accepted for a period of time, and performing an atomicread-correct-write (ARCW) operation, based on detecting the error in thefetched read-refresh data, to correct the detected error in a mannerthat is uninterrupted by other memory requests.

Some embodiments of the method further include detecting an error in thefetched read-refresh data (optionally based on a SECDED or othersuitable ECC), allowing already pending buffered memory requests tocomplete, preventing further memory requests from being issued and/oraccepted for a period of time, and performing an atomicread-correct-write (ARCW) operation, based on detecting the error in thefetched read-refresh data, to correct the detected error in a mannerthat is uninterrupted by other memory requests.

Some embodiments of the method further include detecting an error in thefetched read-refresh data, and performing an atomic read-correct-write(ARCW) operation, based on detecting the error in the fetchedread-refresh data, in order to correct the detected error.

Some embodiments of the method further include detecting an error in thefetched processor data, and performing an atomic read-correct-write(ARCW) operation, based on detecting the error in the fetched processordata, in order to correct the detected error in a manner that isuninterrupted by other memory requests.

Some embodiments of the method further include fetching processor dataas a result of one of the pending processor memory requests, detectingan error in the fetched processor data (optionally based on a SECDED orother suitable ECC), preventing further memory requests from startingfor a period of time, preventing further memory requests from beingissued and/or accepted for a period of time, and performing an atomicread-correct-write (ARCW) operation, based on detecting the error, tocorrect the detected error in a manner that is uninterrupted by othermemory requests.

Some embodiments of the method further include fetching processor dataas a result of one of the pending processor memory requests, detectingan error in the fetched processor data (optionally based on a SECDED orother suitable ECC), allowing already pending buffered memory requeststo complete, preventing further memory requests from being issued and/oraccepted for a period of time, and performing an atomicread-correct-write (ARCW) operation, based on detecting the error, tocorrect the detected error in a manner that is uninterrupted by othermemory requests.

Some embodiments of the method further include detecting an error in thefetched processor data, and performing an atomic read-correct-write(ARCW) operation, based on detecting the error in the fetched processordata, in order to correct the detected error in a manner that isuninterrupted by other memory requests.

Some embodiments of the method further include inserting anexplicit-refresh request periodically into the stream of memory requeststo cause memory parts to perform an internally controlled refreshfunction.

Some embodiments of the method further include inserting anexplicit-refresh request periodically over a first period of time, theninserting a read-refresh request periodically over a second period oftime, then inserting an explicit-refresh request periodically over athird period of time, and then, inserting a read-refresh requestperiodically over a fourth period of time.

Some embodiments of the method further include varying a value of timebetween explicit-refresh requests.

Some embodiments of the method further include varying a value of timebetween read-refresh requests.

Some embodiments of the method further include sending a firstread-refresh request at an initial priority value, and later, if thefirst read-refresh request has not been completed, increasing thepriority value.

Some embodiments of the method further include sending a firstread-refresh request that specifies a first address and an initialpriority value, and later, if the first read-refresh request has notbeen completed, then sending a replacement read-refresh requestspecifying the first address and a higher priority value. In someembodiments, an arbitration circuit is included at the output of thebuffer, and the refresh requests are presented there without passingthrough the buffer, such that the arbitration circuit can chose such arefresh request over other requests in the buffer when the refreshrequest has the higher priority.

Some embodiments of the method further include receiving memory requestsfrom a processor across a high-speed serial external interface, sendingthe memory requests to memory parts, and transmitting data obtained fromthe memory parts to the processor.

Some embodiments of the method further include receiving memory requestsfrom a plurality of processors across a plurality of high-speed serialexternal interfaces, wherein the buffering of pending memory requests isdivided among a plurality of buffers including a first and a secondbuffer, sending memory requests from the first buffer to a firstplurality of memory chips, sending memory requests from the secondbuffer to a second plurality of memory chips, and crossbar switching totransmit and receive memory commands and data to and from the first andsecond buffers, and to and from the plurality of high-speed serialexternal interfaces.

In some embodiments, the method is performed on a single first memorycard.

Some embodiments of the method further include fetching processor dataas a result of one of the pending processor memory requests, detectingan error in the fetched processor data (optionally based on a SECDED orother suitable ECC), preventing further memory requests from startingfor a period of time, and performing an atomic read-correct-write (ARCW)operation, based on detecting the error, to correct the detected errorin a manner that is uninterrupted by other memory requests.

Some embodiments of the method further include fetching processor dataas a result of one of the pending processor memory requests, detectingan error in the fetched processor data (optionally based on a SECDED orother suitable ECC), allowing already pending buffered memory requeststo complete, and performing an atomic read-correct-write (ARCW)operation, based on detecting the error, to correct the detected errorin a manner that is uninterrupted by other memory requests.

In another aspect of the invention, some embodiments provide anapparatus that includes a plurality of memory chips, a memory-requestbuffer, coupled to the memory chips, and configured to hold one or morepending memory requests from a processor that are transmitted to thememory chips, and means as described herein for read-refreshing thememory chips and fetching read-refresh data as a result.

Some embodiments of the apparatus further include an error detectoroperatively coupled to receive read-refresh data from the memory chips,and means for performing an atomic read-correct-write (ARCW) operationto correct a detected error, based on detecting the error in theread-refresh data.

Some embodiments of the method further include an error detectoroperatively coupled to receive processor data from the memory chips, andmeans for performing an atomic read-correct-write (ARCW) operation tocorrect a detected error, based on detecting the error in fetchedprocessor data.

Some embodiments of the method further include means for explicitlyrefreshing the memory chips.

Some embodiments of the apparatus further include means for explicitlyrefreshing the memory chips in a manner periodically alternated with theread-refreshing of the memory chips.

Some embodiments of the apparatus further include means for detecting anerror in the fetched read-refresh data (optionally based on a SECDED orother suitable ECC), means for preventing further memory requests fromstarting for a period of time, and means for performing an atomicread-correct-write (ARCW) operation, based on detecting the error, tocorrect the detected error in a manner that is uninterrupted by othermemory requests.

Some embodiments of the apparatus further include means for detecting anerror in the fetched read-refresh data (optionally based on a SECDED orother suitable ECC), means for allowing already pending buffered memoryrequests to complete, and means for performing an atomicread-correct-write (ARCW) operation, based on detecting the error, tocorrect the detected error in a manner that is uninterrupted by othermemory requests.

Another aspect of some embodiments includes an information-processingsystem that has a dynamic memory, wherein the dynamic memory includes afirst plurality of memory locations, and wherein a sufficient subset ofthe first plurality of memory locations must each be accessed within arefresh-period amount of time, a memory controller, coupled to thememory, and configurable to perform a first read operation to each andevery one of the first plurality of memory locations, each first readoperation causing corresponding read-refresh data to be fetched in apattern that ensures that the sufficient subset is read within therefresh-period amount of time, and an error detector operatively coupledto receive and check for errors the corresponding read-refresh data.

Some embodiments of this system further include an atomicread-correct-write (ARCW) unit configured to correct data at a locationhaving a detected error, based on results from the error detector'scheck of the read-refresh data.

In some embodiments of this system, the ARCW unit is configured toatomically perform: (1) a second read operation to the location havingthe detected error, (2) a correction of the error, and (3) a writeoperation to the location having the detected error.

In some embodiments of this system, the ARCW unit further includes ahold circuit that temporarily halts from starting further ones of atleast certain memory operations that otherwise would start, a readcircuit that causes a second read operation to the location having thedetected error, a SECDED ECC circuit that corrects an error in datafetched by the second read operation based on a SECDED ECC to obtaincorrected data, and a write circuit that causes a write operation withthe corrected data to the location having the detected error, whereuponthe hold circuit again allows the halted memory operations to start.

Some embodiments of this system further include a memory request bufferconfigured to hold a plurality of memory operations, and coupled to thehold circuit such that the certain ones of the memory operations haltedare those in the buffer, and a circuit that prevents further memoryrequests from being issued and/or accepted into the buffer for a periodof time.

In some embodiments of this system, the memory controller is alsoconfigurable to perform explicit refreshes of the memory.

2. Aspects of Some Embodiments that Include Atomic Read-Correct-WriteOperation Asynchronously Scheduled Following Error Detect

In some embodiments, if a single-bit error is detected in data resultingfrom a normal read memory request from the processor, the error is fixedin the memory card and the corrected data is sent to the processor, anda supplemental atomic read-correct-write (ARCW) sequence is scheduled(as above, just in case the original processor or another processor hadquickly modified the contents after the error was detected).

In some embodiments, such an ARCW is also scheduled as the result of anerror being detected in read-refresh data.

Some embodiments provide an information-processing apparatus thatincludes a memory (in some embodiments, this memory includes a pluralityof memory chips), a memory-request buffer, an error detector, and anatomic read-correct-write (ARCW) controller. The memory-request bufferis coupled to the memory and configured to hold one or more pendingmemory requests that go to the memory. The error detector is coupled toreceive read data from the memory and configured to detect one or morebit errors in the read data. The ARCW controller coupled to thememory-request buffer and configured, based on detection of an error bythe error detector, to control an atomic read-correct-write operation tocorrect the detected error at its respective address.

Some embodiments of the apparatus further include a memory-requestbuffer that is configured to hold a plurality of pending memoryrequests. In these embodiments, the error detector detects errors basedon a SECDED ECC; the ARCW controller operates to inhibit memoryoperations from the memory-request buffer, at least to a memory area towhich the ARCW is directed, and prevent further memory requests frombeing issued for a period of time to allow the ARCW operation toeffectively complete.

Some embodiments of the apparatus further include a refresh controller.The refresh controller is coupled to the memory-request buffer, andconfigured to send read-refresh requests using refresh addresses thatcycle through address bits for a first-address portion of the refreshaddress and also cycle through bits for a second-address portion of therefresh address. In these embodiments, the data is fetched to thememory-chip interface and checked by the error detector as a result ofeach one of a plurality of the read-refresh requests.

Some embodiments of the apparatus further include a refresh controllerthat is further configured to send explicit-refresh requests to thememory. In these embodiments, the explicit-refresh requests are sent tothe memory to cause the memory to perform an internally controlledrefresh function.

Some embodiments of the apparatus further include an arbitration circuithaving one or more inputs connected to receive output of the buffer,wherein refresh requests are presented to one or more inputs of thearbitration circuit without passing through the buffer, such that thearbitration circuit can chose such a refresh request over other requestsin the buffer when the refresh request has a higher priority.

Some embodiments of the apparatus further include a refresh controllerthat sends a plurality of explicit-refresh requests over a first periodof time without intervening read-refresh requests, then a plurality ofread-refresh requests over a second period of time without interveningexplicit-refresh requests, then sends a plurality of explicit-refreshrequests over a third period of time, and then a plurality ofread-refresh requests over a fourth period of time.

Some embodiments of the apparatus further include a refresh controllerthat includes a timer controller that allows the timing betweenexplicit-refresh requests to be varied.

Some embodiments of the apparatus further include a refresh controllerthat includes a priority controller that sends a first read-refreshrequest at an initial priority value, and later if the firstread-refresh request has not been completed, increases the priorityvalue. Some embodiments include an arbitration circuit connected toreceive memory requests from buffer 520 and also to receive refreshrequests and/or ARCW requests and to arbitrate to issued the highestpriority request first and to send overlapping (in time) requests todifferent banks of memory connected to one memory controller 127.

Some embodiments of the apparatus further include a refresh controllerthat includes a priority controller that sends a first read-refreshrequest specifying a first address and at an initial priority value, andlater if the first read-refresh request has not been completed, thensends, at a higher priority value, a replacement read-refresh requestspecifying the first address.

Some embodiments of the apparatus further include a plurality ofhigh-speed serial external interfaces, including a second memorycontroller substantially the same as the first memory controller, afirst plurality of memory chips operatively coupled to the first memorycontroller, a second plurality of memory chips operatively coupled tothe second memory controller, and a crossbar switch operatively coupledto transmit and receive memory commands and data to and from the firstand second memory controllers, and to and from the plurality ofhigh-speed serial external interfaces.

In some embodiments, the apparatus is packaged on a single first memorycard.

Some embodiments of the apparatus further include a second memory cardsubstantially the same as the first memory card, a first plurality ofprocessors coupled to the first memory card and to the second memorycard, a third and fourth memory card each substantially the same as thefirst memory card, a second plurality of processors coupled to the thirdmemory card and to the fourth memory card, a network operatively coupledbetween the first plurality of processors and the second plurality ofprocessors, and an input/output system operatively coupled to providedata to and from the first plurality of processors.

Some embodiments of the apparatus further include a first plurality ofprocessors coupled to the plurality of high-speed serial externalinterfaces, a network operatively coupled to each of the first pluralityof processors, an input/output system operatively coupled to providedata to and from the first plurality of processors, and a power supplyoperatively coupled to provide power to the first plurality ofprocessors.

Some embodiments of the apparatus further include a first-addressportion that has address bits for a row of data in a memory chip and thesecond-address portion has address bits for a column of data in thememory chip.

Some embodiments of the information-processing method that includesbuffering a plurality of pending memory requests from a processor,sending a stream of processor memory requests from the buffered pendingmemory requests to a memory, fetching data based on a first memoryrequest, detecting an error in the fetched data, and performing anatomic read-correct-write (ARCW) operation, based on detecting the errorin the fetched data, to correct the detected error.

Some embodiments of the method further include inserting a read-refreshrequest periodically into the stream of processor memory requests. Inthese embodiments, the periodic read-refresh requests are sent usingrefresh addresses that cycle through address bits for a first-addressportion and also cycle through bits for a second-address portion, andfetching data as a result of each of the read-refresh requests.

Some embodiments of the method further include arbitrating betweenmemory requests from one or more processors in a buffer, and refreshrequests presented without passing through the buffer, such that thearbitrating chooses such a refresh request over other requests in thebuffer when the refresh request has a higher priority.

Some embodiments of the apparatus further include a first-addressportion that has address bits for a row of data in a memory chip and thesecond-address portion has address bits for a column of data in thememory chip.

In some embodiments of the method, there is an amount of time betweenread-refresh requests, and the method further includes varying theamount of time between read-refresh requests.

In some embodiments of the method, read-refresh requests have apriority, and the method further includes varying the priority of theread-refresh requests.

Some embodiments of the method further include inserting anexplicit-refresh request periodically into the stream of memory requeststo cause memory parts to perform an internally controlled refreshfunction.

Some embodiments of the method further include inserting anexplicit-refresh request periodically over a first period of timewithout intervening read-refresh requests, then inserting a read-refreshrequest periodically over a second period of time without interveningexplicit-refresh requests, then inserting an explicit-refresh requestperiodically over a third period of time, and then, inserting aread-refresh request periodically over a fourth period of time.

In some embodiments of the method, there is an amount of time betweenexplicit refresh requests, and the method further includes varying theamount of time between explicit-refresh requests.

Some embodiments of the method further include sending a firstread-refresh request at an initial priority value, and later, if thefirst read-refresh request has not been completed, increasing thepriority value.

Some embodiments of the method further include sending a firstread-refresh request that specifies a first address and an initialpriority value, and later, if the first read-refresh request has notbeen completed, then sending a replacement read-refresh requestspecifying the first address and a higher priority value.

Some embodiments of the method further include receiving memory requestsfrom a plurality of processors across a plurality of high-speed serialexternal interfaces, wherein the buffering of pending memory requests isdivided among a plurality of buffers including a first and a secondbuffer, sending memory requests from the first buffer to a firstplurality of memory chips, sending memory requests from the secondbuffer to a second plurality of memory chips, and crossbar switching totransmit and receive memory commands and data to and from the first andsecond buffers, and to and from the plurality of high-speed serialexternal interfaces.

In some embodiments, the method is performed on a single first memorycard.

Some embodiments of the method further include the performing of theARCW operation that further includes inhibiting execution ofalready-pending buffered memory requests, and preventing further memoryrequests from being issued for a period of time.

In some embodiments of the method the first-address portion furtherincludes address bits for a row of data in a memory chip and thesecond-address portion further includes address bits for a column ofdata in the memory chip.

In some embodiments, an information-processing system includes a memory,a memory-request buffer, coupled to the memory, and configured to holdone or more pending memory requests from a processor that aretransmitted to the memory, and means as described herein for detectingan error in the fetched data and for performing an atomicread-correct-write (ARCW) operation, based on detecting the error in thefetched data, to correct the detected error.

Some embodiments of the system include means for inhibiting alreadypending buffered memory requests from executing, and means forpreventing further memory requests from being issued for a period oftime.

Some embodiments of the system include means for allowing alreadypending buffered memory requests to complete, and means for preventingfurther memory requests from being issued for a period of time.

Some embodiments of the system include means for allowing only alreadyissued memory requests to complete, and means for preventing furthermemory requests from being issued for a period of time.

Some embodiments of the system include means for allowing only alreadyissued memory requests to complete, and means for preventing furthermemory requests from being accepted and/or issued for a period of time.

Some embodiments of the system further include means for read-refreshingthe memory and fetching read-refresh data as a result.

Some embodiments of the system further include means for varying timingbetween read-refresh requests.

In some embodiments of the system, read-refresh requests have apriority, and the system further includes means for varying the priorityof read-refresh requests.

Some embodiments of the system further include means for explicitlyrefreshing the memory.

Some embodiments of the system further include means for explicitlyrefreshing the memory in a manner periodically alternated with theread-refreshing of the memory.

In some embodiments of the system, explicit-refresh requests have apriority, and the system further includes means for varying the priorityof explicit requests.

In some embodiments, one aspect of the invention is aninformation-processing system that includes a memory, a memorycontroller configured to send a first read operation to the memory andto receive read data from a first location specified by the first readoperation, an error detector, configured to check the received read dataand to detect one or more bit errors in the read data, and an atomicread-correct-write (ARCW) controller coupled to the memory controller,and configured, based on detection of an error by the error detector, tocontrol an atomic read-correct-write operation that includes,atomically, a second read operation to the first location, a correctionoperation, and a write operation to the first location.

Some embodiments further include a memory-request buffer, coupled to thememory, and configured to hold one or more pending memory requests thatgo to the memory. In some embodiments, the memory-request buffer isconfigured to hold a plurality of pending memory requests, and whereinthe ARCW controller operates to inhibit memory operations from thememory-request buffer, at least to a memory area to which the ARCW isdirected, and prevent further memory requests from being issued and/oraccepted for a period of time to allow the ARCW operation to effectivelycomplete. In some such embodiments, the error detector detects errorsbased on a SECDED ECC.

Some embodiments further include a refresh controller, coupled to thememory, and configured to send read-refresh requests the read-refreshrequests using refresh addresses that cycle through address bits for afirst-address portion of the refresh address and also cycle through bitsfor a second-address portion of the refresh address, and wherein data isfetched to the memory-chip interface and checked by the error detectoras a result of each one of a plurality of the read-refresh requests.

3. Aspects of Some Embodiments that Include Bit Swapping on the Fly andTesting of that Function

Some embodiments of the invention provide that each memory controllercan swap a spare bit into operation in a section of memory, dynamicallyin the background (in some embodiments, as part of the regularread-refresh memory requests) while keeping the data in its normallyaddressed locations and even allowing functional processing to continueto the affected memory locations during the swap operation. Thus, ratherthan dumping all of a section of memory using a default bit-mappingconfiguration and then reloading the entire memory using a differentbit-mapping configuration in order to compensate for a stuck orunreliable bit position, one at a time, each word in the affectedportion of memory is read using the default or normal bit mapping,corrected if necessary, and then written to the same address but usingthe bit-swapped mapping. Some embodiments use pointers that define thestart address and end address of the bit-swapped portion of memory, suchthat regular processor read memory requests and write memory requestsuse the bit-swapped mapping for the portion that has been swapped, anduse the normal bit mapping for the portion that has not been swapped.This allows the bit swapping operations and regular processor readmemory requests and write memory requests to be performed at the sametime (though individual memory requests are interleaved).

Some embodiments further provide one or more very high-speed serialinterfaces to the processor, and optionally an on-card L3 cache.

Another aspect of the invention, in some embodiments, includes abit-shifting circuit that allows bit swapping for a subset of all memoryspace, i.e., allows any data bit or SECDED ECC bit to be disconnected orignored, and effectively replaced using a spare bit.

Some embodiments provide an information-processing apparatus thatincludes a first memory having a plurality of addressed locations, eachlocation holding a plurality of bits, and a first control circuit. Thecontrol circuit includes a first memory controller. The memorycontroller includes an address-range detector that specifies a rangespanning a subset of the addressed locations, and that, for each memoryrequest, determines whether an address of the memory request is withinthe specified range, and a read-data bit-swap circuit coupled to receivedata from the first memory and operatively coupled to the address-rangedetector, and based on an indication from the address-range detector asto whether a memory request address is within the range, to swap one ormore bits of the data.

Some embodiments of the apparatus further include a test engineoperatively coupled to the first memory controller and configured toprovide test functions to verify whether, for memory requests havingaddresses within the range, the one or more bits are swapped. In someembodiments, the first control circuit is located on a first memorycard, and the test engine is located on a second memory card that issubstantially identical to the first memory card.

Some embodiments of the apparatus further include a write-data bit-swapcircuit coupled to transmit data to the memory and operatively coupledto the address-range detector, and based on an indication from theaddress-range detector as to whether a memory request address is withinthe range, to swap one or more bits of the data.

In some embodiments, the control circuit further includes a test engineoperatively coupled to the first memory controller and configured toprovide testing functions to verify whether, for memory requests havingaddresses within the range, the one or more bits are swapped, and formemory requests having addresses outside the range, the one or more bitsare not swapped.

In some embodiments, the first memory controller further includes anaddress incrementer operatively coupled to the address-range detector toadjust an end of the specified range.

In some embodiments, the first memory controller further includes asection-swap controller operatively coupled to initialize the addressrange detector and address incrementer, and to control, for eachlocation within a set of memory locations of memory, a section-swapoperation that uses an atomic read-write operation that reads data fromthe location in memory using a first bit-mapping configuration and towrites data back to the location in memory using a second bit-mappingconfiguration different than the first.

As used herein, a “section” is any set of addresses in memory. Such aset of addresses could include, for example,

-   -   all addresses between address X and address Y of the portion of        memory 130 connected to one controller 127, or    -   all addresses between zero and address Y of some portion of        memory, or    -   either all even-numbered or all odd-numbered addresses between        zero and address Y of the portion of memory 130 connected to one        controller 127 (useful, for example, if only one half of a set        of stacked memory chips connected to one controller had a        failing bit), or    -   every fourth address between address X and address Y of some        portion of memory 130, or    -   all addresses between address delta-X and address delta-Y within        each one of a plurality of sub-portions (i.e., delta-X and        delta-Y are address offsets, e.g., banks) of memory 130        connected to one controller 127, or    -   all addresses between address delta-zero and address delta-Y        within each one of a plurality of sub-portions (e.g., banks) of        memory 130 connected to one controller 127, or    -   any other specified set of addresses of any or all of memory        130.

In some embodiments, the control circuit further includes a test engineoperatively coupled to the first memory controller and configured toprovide testing functions to verify whether, the section-swap controllerproperly functions to control the atomic reading and writing such thatnormal read operations and write operations obtain correct data duringthe section-swap operation.

In some embodiments, the first memory controller further includes anerror-correction circuit that, for at least some of the atomicread-write operations, corrects an error in the read data and generatescorrected data for the write.

In some embodiments of the apparatus, the first memory controllerfurther includes a processor memory-request controller that, interleavedbetween the atomic read-write operations, performs processor memoryoperations both within the specified range and outside of the specifiedrange.

Some embodiments of the apparatus further include a memory-requestbuffer configured to hold a plurality of pending memory requests,wherein the error-correction circuit corrects errors based on a SECDEDECC, and wherein, for each atomic read-write operation, the section-swapcontroller operates to inhibit further operations from issuing from thememory-request buffer and allowing already issued and pending memoryrequests to complete and preventing further conflicting memory requestsfrom being issued and/or accepted for a period of time to allow theatomic read-write operation to effectively complete.

Some embodiments of the apparatus further include a refresh controller,coupled to the memory-request buffer, and configured to sendread-refresh requests using refresh addresses that cycle through addressbits for a first-address portion of the refresh address and also cyclethrough bits for a second-address portion of the refresh address, andwherein data is fetched to the memory interface and checked by an errordetector as a result of each of the read-refresh requests.

In some embodiments, the first address portion includes address bits fora row of data in a memory chip and the second address portion includesaddress bits for a column of data in the memory chip.

In some embodiments, the refresh controller is further configured tosend explicit-refresh requests to the memory-request buffer, wherein theexplicit-refresh requests are sent to the memory to cause the memory toperform an internally controlled refresh function.

In some embodiments, the refresh controller further includes a timercontroller that allows the timing between explicit-refresh requests tobe varied.

In some embodiments, the refresh controller further includes a prioritycontroller that sends a first read-refresh request at an initialpriority value, and later if the first read-refresh request has not beencompleted, increases the priority value, in order to ensure completionof the refresh within the required refresh interval.

Some embodiments of the apparatus further include a plurality ofhigh-speed serial external interfaces, a second memory controllersubstantially the same as the first memory controller, a second memoryoperatively coupled to the second memory controller, and a crossbarswitch operatively coupled to transmit and receive memory commands anddata to and from the first and second memory controllers, and to andfrom the plurality of high-speed serial external interfaces.

In some embodiments, the apparatus is packaged on a single first memorycard.

Some embodiments of the apparatus further include a second memory cardsubstantially the same as the first memory card, a first plurality ofprocessors coupled to the first memory card and to the second memorycard, a third and fourth memory card each substantially the same as thefirst memory card, a second plurality of processors coupled to the thirdmemory card and to the fourth memory card, a network operatively coupledbetween the first plurality of processors and the second plurality ofprocessors, and an input/output system operatively coupled to providedata to and from the first plurality of processors.

Some embodiments of the apparatus further include a first plurality ofprocessors coupled to the plurality of high-speed serial externalinterfaces, a network operatively coupled to each of the first pluralityof processors, an input/output system operatively coupled to providedata to and from the first plurality of processors, and a power supplyoperatively coupled to provide power to the first plurality ofprocessors.

Some embodiments provide an information-processing method that includesreceiving a first memory request, detecting whether an address of thefirst memory request is within a specified range of addresses, swappinga subset of bit positions of a first portion (e.g., word or quad-word orother unit) of data based on the first address being detected as withinthe specified range, and writing the bit-swapped first data to thememory.

Some embodiments of the method further include receiving a second memoryrequest, detecting whether an address of the second memory request iswithin a specified range of addresses, fetching second data based on asecond memory request address, and not swapping bits of the second databased on the second address being detected as not within the specifiedrange.

Some embodiments use the read-refresh data that was read for aread-refresh operation as the source data for a swap-and-write portionof an atomic read-swap-write operation. Thus, the swap of an entiresection of memory can be performed as part of the refresh beingperformed anyway, thus incurring little performance penalty for any ofthe swaps (the small increment to do the additional write). Someembodiments allow swapping of only a portion of a bank of memory, suchthat some read-refresh operations (those to the portion of the bankbeing swapped) obtain data that is swapped and written back to itssource location, while other read-refresh operations (those to theportion of the bank not being swapped) obtain data that is checked forerrors and then discarded (if a correctable error is detected, thecorrection is performed in a subsequently scheduledatomic-read-correct-write operation. In some embodiments, if theread-refresh data is to be swapped and written, it is also ECC checkedand corrected if need be, before being swapped and written (thusavoiding the subsequently scheduled atomic-read-correct-writeoperation).

Some embodiments of the method further include receiving a second memoryrequest just prior in time to the first memory request, detectingwhether an address of the second memory request is within a specifiedrange of addresses, fetching second data based on a second memoryrequest address, and not swapping bits of the second data based on thesecond address being detected as not within the specified range. Thatis, the bit swapping can occur for some addresses and yet not occur forother addresses of accesses immediately before or after in time to theaccesses that read, swapped, and wrote the swapped bits, even forvarious subsets of addresses in a single bank of memory, since thecontroller need not shut down even one bank to perform the swapoperation.

Some embodiments of the method further include changing an end addressof the specified range between the second and first memory requests,wherein the second address equals the first address such that data basedon the read second data is bit-swapped to produce the first data andwritten to its same address.

Some embodiments of the method further include performing errorcorrection on the read data before bit swapping and writing.

Some embodiments of the method further include iteratively changing theend address and reading and writing data in a section of the memory inorder to dynamically move data in the section of the memory from anormal bit mapping configuration to a bit-swapped mapping configuration.

Some embodiments of the method further include buffering a firstplurality of pending memory requests from a processor, sending a streamof the first processor memory requests from the buffered pending memoryrequests to the memory, and stopping issuing or executing processormemory requests in order to perform fetching the second data and writingthe first data atomically.

Some embodiments of the method further include inserting a read-refreshrequest periodically into the stream of processor memory requests,wherein the periodic read-refresh requests are sent using refreshaddresses that cycle through address bits for a row-address portion andalso cycle through bits for a column-address portion, fetching data as aresult of each of the read-refresh requests, detecting an error in oneof the fetched sets of data, and based on the detecting of the error,performing the bit-swapping operations.

Some embodiments of the method further include varying a value of timebetween read-refresh requests.

Some embodiments of the method further include varying a priority of theread-refresh requests.

Some embodiments of the method further include inserting anexplicit-refresh request periodically into the stream of memory requeststo cause memory parts to perform an internally controlled refreshfunction.

In some embodiments, the method is performed on a single memory card.

Some embodiments provide an information-processing system that includesa memory, a memory-request buffer, coupled to the memory, and configuredto hold one or more pending memory requests from a processor that aretransmitted to the memory, and means as described herein for changing amapping of bits that are read and written to the memory.

Some embodiments of the apparatus further include means for testing themapping of bits.

Some embodiments of the apparatus further include means forread-refreshing the memory and fetching read-refresh data as a resultand correcting errors if errors are detected.

Some embodiments of the apparatus further include means for varyingtiming between read-refresh requests.

Some embodiments of the apparatus, each request has a priority, and theapparatus further include means for varying the priority of read-refreshrequests.

Some embodiments of the apparatus further include means for explicitlyrefreshing the memory.

Some embodiments of the apparatus further include means for explicitlyrefreshing the memory in a manner periodically alternated with theread-refreshing of the memory.

4. Aspects of Some Embodiments that Include Bit-Swapping andAddress-Range Compare Circuit

Some embodiments of the invention provide a bit-shifting circuit thatallows bit swapping for a changeable subset of all memory space, i.e.,allows any data bit or SECDED ECC bit in a word or in a range of wordsto be disconnected or ignored, and effectively replaced using a sparebit. The specified range can be changed one word at a time to allowrecovering (reading and correcting detected errors) data from a sectionof memory affected by a stuck or unreliable bit, and writing the databack to the same address locations but with a different bit mapping. Foreach memory request coming from a processor, the address range circuitdetermines whether the request is inside or outside of the range ofaddresses that have been bit-swapped, and uses one or another of the bitmappings as appropriate to access the data correctly. These normalprocessor operations can be intertwined with theatomic-read-correct-write (ARCW) operations that work to successivelymove each word from its normal bit mapping to the alternative bitmapping, e.g., wherein the end address of the range is incremented byone for each word remapped, and the processor need not be aware of theremapping, or at least of its progress.

Some embodiments provide an information-processing apparatus thatincludes a first memory having a plurality of addressed locations, eachlocation holding a plurality of bits, and a first control circuit. Thefirst control circuit includes a first memory controller coupled to thefirst memory. The memory controller includes a read-bit-swap circuitcoupled to receive data from the first memory, the read-bit-swap circuitincluding a plurality of two-input one-output multiplexers, wherein eachread bit is coupled to one input on each of two non-adjacentmultiplexers, a write-data bit-swap circuit coupled to transmit data tothe first memory, the write-bit-swap circuit including a plurality oftwo-input one-output multiplexers, wherein each bit to be written iscoupled to one input on each of two non-adjacent multiplexers, and aswap-controller circuit operatively coupled to the read-bit-swap circuitand to the write-data bit-swap circuit to selectively choose one or morespare bits in place of a corresponding number of other bits.

Some embodiments of the apparatus further include an address-rangedetector that specifies a range spanning a subset of the addressedlocations, and for each memory request, that determines whether anaddress of the memory request is within the specified range and that iscoupled to control the read-bit-swap circuit and the write-bit-swapcircuit.

Some embodiments of the apparatus further include an address incrementeroperatively coupled to address-range detector to adjust an end of thespecified range.

Some embodiments of the apparatus further include a section-swapcontroller operatively coupled to initialize the address range detectorand address incrementer to, for each location within a section ofmemory, control an atomic read-write operation that reads data from thelocation in memory using a first bit-mapping configuration and to writesdata back to the location in memory using a second bit-mappingconfiguration different than the first.

Some embodiments of the apparatus further include an error-correctioncircuit that, for at least some of the atomic read-write operations,corrects an error in the read data and generates corrected data for thewrite.

Some embodiments of the apparatus further include a processormemory-request controller that, interleaved between the atomicread-write operations, performs processor memory operations both withinthe specified range and outside of the specified range.

Some embodiments of the apparatus further include a memory-requestbuffer configured to hold a plurality of pending memory requests,wherein the error-correction circuit corrects errors based on anerror-correction code (ECC), and wherein, for each atomic read-writeoperation, the section-swap controller operates to inhibit conflictingoperations from the memory-request buffer during each read-swap-writeoperation while allowing non-conflicting operations in the buffer to beprocessed.

Some embodiments of the apparatus further include a memory-requestbuffer configured to hold a plurality of pending memory requests,wherein the error-correction circuit corrects errors based on a SECDEDECC, and wherein, for each atomic read-write operation, the section-swapcontroller operates to inhibit at least conflicting operations from thememory-request buffer and, if need be, to prevent further memoryrequests from being issued and/or accepted (for example, not loadingrequests into the buffer of the affected memory controller 127 whileallowing requests to be loaded into and processed from the buffers ofthe other memory controllers, or in other embodiments, loading requestsinto the buffer but not issuing the requests from the buffer, or atleast those requests that would conflict with the read-swap-writeoperation) for a period of time to allow the atomic read-write operationto effectively complete. In other embodiments, other suitable ECCmethods (other than SECDED) and/or circuits are used. In someembodiments, memory requests for other memory controllers 127 or otherbuffers.

Some embodiments of the apparatus further include a refresh controller,coupled to the memory-request buffer, and configured to sendread-refresh requests, the read-refresh requests using refresh addressesthat cycle through address bits for a row-address portion of the refreshaddress and also cycle through bits for the column-address portion ofthe refresh address, and wherein data is fetched to the memory-chipinterface and checked by an error detector as a result of each of theread-refresh requests.

In some embodiments, the refresh controller is further configured tosend explicit-refresh requests to the memory-request buffer, wherein theexplicit-refresh requests are sent to the memory chips to cause thememory chips to perform an internally controlled refresh function.

In some embodiments, the refresh controller further includes a timercontroller that allows the timing between explicit-refresh requests tobe varied.

In some embodiments, the refresh controller further includes a prioritycontroller that sends a first read-refresh request at an initialpriority value, and later if the first read-refresh request has not beencompleted, increases the priority value.

Some embodiments of the apparatus further include a test engineoperatively coupled to the first memory controller and configured toprovide test functions to verify whether, for memory requests havingaddresses within the range, the one or more bits are swapped, whereinthe first control circuit is located on a first memory card, and thetest engine is located on a second memory card that is substantiallyidentical to the first memory card.

Some embodiments of the apparatus further include a plurality ofhigh-speed serial external interfaces, a second memory controllersubstantially the same as the first memory controller, a second memoryoperatively coupled to the second memory controller, and a crossbarswitch operatively coupled to transmit and receive memory commands anddata to and from the first and second memory controllers, and to andfrom the plurality of high-speed serial external interfaces.

In some embodiments, the apparatus is packaged on a single first memorycard.

Some embodiments of the apparatus further include a second memory cardsubstantially the same as the first memory card, a first plurality ofprocessors coupled to the first memory card and to the second memorycard, a third and fourth memory card each substantially the same as thefirst memory card, a second plurality of processors coupled to the thirdmemory card and to the fourth memory card, a network operatively coupledbetween the first plurality of processors and the second plurality ofprocessors, and an input/output system operatively coupled to providedata to and from the first plurality of processors.

Some embodiments of the apparatus further include a first plurality ofprocessors coupled to the plurality of high-speed serial externalinterfaces, a network operatively coupled to each of the first pluralityof processors, an input/output system operatively coupled to providedata to and from the first plurality of processors, and a power supplyoperatively coupled to provide power to the first plurality ofprocessors.

Some embodiments provide an information-processing method that includesreceiving a first memory request that specifies an address, detectingwhether the address of the first memory request is within a specifiedrange of addresses, and

-   -   (a) if the first memory request is for one or more write        operations, then: shifting a first subset of bit positions a        plurality of bit positions in a first direction for first data        of each write operation address being detected as within the        specified range, and writing the bit-swapped first data to the        memory, and    -   (b) if the first memory request is for one or more read        operations, then: reading second data from the memory, and        shifting a second subset of bit positions a plurality of bit        positions in a second direction opposite the first direction for        each read operation address being detected as within the        specified range.

Some embodiments of the method further include performing an atomicread-write operation that includes a first memory read request from asecond address and a second memory write request the second address.

Some embodiments of the method further include changing an end addressof the specified range between the second and first memory requests ofthe atomic read-write operation, such that data based on the read seconddata is bit-swapped to produce the first data and written to its sameaddress.

Some embodiments of the method further include performing errorcorrection on the read data before bit swapping and writing.

Some embodiments of the method further include iteratively changing theend address and reading and writing data in a section of the memory inorder to dynamically move data in the section of the memory from anormal bit mapping configuration to a bit-swapped mapping configuration.

Some embodiments of the method further include buffering a firstplurality of pending memory requests from a processor, sending a streamof the first processor memory requests from the buffered pending memoryrequests to the memory, and stopping servicing of processor memoryrequests in order to perform fetching the second data and writing thefirst data atomically. Some embodiments of the method further includecontinuing to buffer and service requests to other buffers.

Some embodiments of the method further include buffering a firstplurality of pending memory requests from a processor, sending a streamof the first processor memory requests from the buffered pending memoryrequests to the memory, and stopping issuing of processor memoryrequests in order to perform fetching the second data and writing thefirst data atomically.

Some embodiments of the method further include buffering a firstplurality of pending memory requests from a processor, sending a streamof the first processor memory requests from the buffered pending memoryrequests to the memory, and stopping servicing of processor memoryrequests in order to perform fetching the second data and writing thefirst data atomically. Some of these embodiments further includecontinuing to buffer and service requests to other buffers.

Some embodiments of the method further include inserting a read-refreshrequest periodically into the stream of processor memory requests,wherein the periodic read-refresh requests are sent using refreshaddresses that cycle through address bits for a row-address portion andalso cycle through bits for a column-address portion, fetching data as aresult of each of the read-refresh requests, detecting an error in oneof the fetched sets of data, and based on one or more criteria, whereinthe criteria include the detecting of the error, performing thebit-swapping operations.

Some embodiments of the method further include varying a value of timebetween read-refresh requests.

Some embodiments of the method further include varying a priority of theread-refresh requests.

Some embodiments of the method further include inserting anexplicit-refresh request periodically into the stream of memory requeststo cause memory parts to perform an internally controlled refreshfunction.

In some embodiments, the method is performed on a single memory card.

Some embodiments of the method further include functionally testing toverify whether, for memory requests having addresses within the range,the one or more bits are swapped, wherein the shifting takes place on afirst memory card, and the functionally testing further includesoriginating test commands and checking results on a second memory cardthat is substantially identical to the first memory card.

In some embodiments, the detecting of whether the first address iswithin a specified range of addresses includes comparing the firstaddress to an address specifying an end of the specified range. In someembodiments, only a single compare is needed if one end of the range iszero (or the very last location of a controller's portion of memory). Insome embodiments, the detecting of whether the first address is within aspecified range of addresses further includes comparing the firstaddress to an address specifying an opposite end of the specified range.If non-zero ends of the range are implemented, a second compare may berequired, for example, if addresses below a value X or above a value Yare outside the range, and addresses from X to Y form the range.

Some embodiments provide an information-processing apparatus thatincludes a first memory having a plurality of addressed locations, eachlocation holding a plurality of bits, and a first control circuit. Thefirst control circuit includes a first memory controller coupled to thefirst memory. The memory controller includes means for shifting a firstsubset of bit positions a plurality of bit positions in a firstdirection for each write-operation address being detected as within thespecified range, and for writing the bit-swapped first data to thememory, means for reading the first data to the memory, and for shiftinga second subset of bit positions a plurality of bit positions in asecond direction opposite the first direction for each read-operationaddress being detected as within the specified range.

Some embodiments of the apparatus further include means for performingan atomic read-write (RMW) operation that includes a first memory readrequest from a first address and a second memory write request the firstaddress. In some embodiments, the controller is configured to consideran RMW as one request.

Some embodiments of the apparatus further include means for changing anend address of the specified range between the second and first memoryrequests, such that data based on the read second data is bit-swapped toproduce the first data and written to its same address.

Some embodiments of the apparatus further include means for performingerror correction on the read data before bit swapping and writing.

Some embodiments of the apparatus further include means for iterativelychanging the end address and reading and writing data in a section ofthe memory in order to dynamically move data in the section of thememory from a normal bit mapping configuration to a bit-swapped mappingconfiguration.

Some embodiments of the apparatus further include means for buffering afirst plurality of pending memory requests from a processor, means forsending a stream of the first processor memory requests from thebuffered pending memory requests to the memory, and means for stoppingbuffering of processor memory requests in order to perform fetching thesecond data and writing the first data atomically.

Some embodiments of the apparatus further include means for inserting aread-refresh request periodically into the stream of processor memoryrequests, wherein the periodic read-refresh requests are sent usingrefresh addresses that cycle through address bits for a row-addressportion and also cycle through bits for a column-address portion, meansfor fetching data as a result of each of the read-refresh requests,means for detecting an error in one of the fetched sets of data, andmeans for, based on one or more criteria, wherein the criteria includethe detecting of the error, performing the bit-swapping operations.

Some embodiments of the apparatus further include means for varying avalue of time between read-refresh requests.

Some embodiments of the apparatus further include means for varying apriority of the read-refresh requests.

Some embodiments of the apparatus further include means for inserting anexplicit-refresh request periodically into the stream of memory requeststo cause memory parts to perform an internally controlled refreshfunction.

In some embodiments, the apparatus is implemented on a first memorycard. Some such embodiments of the apparatus further include, on asecond memory card, means for functionally testing to verify whether,for memory requests having addresses within the range, the one or morebits are swapped, wherein the means for shifting is on the first memorycard, and wherein the second memory card is connected to the firstmemory card.

Some embodiments provide a computer-readable medium having control datathereon for causing a suitably programmed information-processing systemto execute a method that includes receiving a first memory request,detecting whether an address of the first memory request is within aspecified range of addresses, swapping a subset of bit positions of afirst of data based on the first address being detected as within thespecified range, and writing the bit-swapped first data to the memory.

In some embodiments, of the medium, the method further includesreceiving a second memory request, detecting whether an address of thesecond memory request is within a specified range of addresses, fetchingsecond data based on a second memory request address, and not swappingbits of the second data based on the second address being detected asnot within the specified range.

5. Other Aspects of Some Embodiments

Some embodiments of the invention include a W-circuit, a memory daughtercard (MDC) that includes at least one such W-circuit 120, a processornode that includes at least one such MDC 110 and at least one processingunit, and/or a multi-processor that includes a plurality of suchprocessor nodes, wherein the W-circuit 120 and/or other circuitry orsoftware of the processor system incorporates or implements one or morecombinations of the features described individually herein in asynergistic combination. Such combinations are specifically contemplatedfor some embodiments. Some embodiments of the invention include aplurality of the features, wherein various combinations can beselectively enabled or disabled, for example, by loading the appropriatedata combinations into the MMRs or by loading various microcode orsequencing programs into the appropriate storage on the W-circuit 120 orelsewhere in the system.

Some embodiments of the invention include a computer-readable medium(such as, for example, a CDROM, DVD, floppy diskette, hard disk drive,flash memory device, or network or internet connection connectable tosupply instructions). The computer-readable medium includes instructionsstored thereon for causing a suitably programmed information processingsystem to perform one or more methods that implement any or all of theinventions and combinations described herein. In some embodiments, thiscomputer-readable medium is connected or connectable to system 100 ofFIG. 1.

It is to be understood that the above description is intended to beillustrative, and not restrictive. Although numerous characteristics andadvantages of various embodiments as described herein have been setforth in the foregoing description, together with details of thestructure and function of various embodiments, many other embodimentsand changes to details will be apparent to those of skill in the artupon reviewing the above description. The scope of the invention shouldbe, therefore, determined with reference to the appended claims, alongwith the full scope of equivalents to which such claims are entitled. Inthe appended claims, the terms “including” and “in which” are used asthe plain-English equivalents of the respective terms “comprising” and“wherein,” respectively. Moreover, the terms “first,” “second,” and“third,” etc., are used merely as labels, and are not intended to imposenumerical requirements on their objects.

1. An information-processing apparatus comprising: a first memorycontroller comprising: a memory-chip interface that outputs a stream ofprocessor memory requests to a plurality of memory chips, wherein thestream of processor memory requests includes a plurality of readrequests and a plurality of write requests, wherein each of the streamof processor requests specifies a memory address that is sent in aplurality of portions to at least one of the plurality of memory chips,including a row-address portion that specifies a selected row and acolumn-address portion that specifies one or more selected columnlocations within the selected row; and a refresh controller, coupled tothe memory-chip interface, and configured to insert read-refreshrequests into the stream of processor requests, wherein the read-refreshrequests use refresh addresses that cycle through address-bitcombinations for the row-address portion to access all rows of the atleast one of the plurality of memory chips within a refresh-raterequirement of the plurality of memory chips, and to also cycle throughthe address-bit combinations for the column-address portion to accessall columns in each row, and wherein read-refresh result data is fetchedto the memory-chip interface as a result of each of the read-refreshrequests such that read-refresh result data is fetched from every datalocation in the plurality of memory chips at intervals using theread-refresh requests.
 2. The apparatus of claim 1, further comprising:a memory-request buffer operatively coupled to the memory interface andconfigured to hold a plurality of pending memory requests; an errordetector, operatively coupled to the memory-request buffer andconfigured to receive the read-refresh result data from the memory-chipinterface and to detect one or more bit errors in the read-refreshresult data; an atomic read-correct-write (ARCW) controller operativelycoupled to the memory-request buffer and configured, based on detectionof an error in the read-refresh result data from a given location by theerror detector, to control an atomic read-correct-write operation tocorrect data stored at the given location of the detected error in amanner that is uninterrupted by other requests that could affectcorrection of the erroneous data, wherein the error detector detectserrors based on a single-error-correct/double-error-detecterror-correction code (SECDED ECC), and wherein the ARCW controlleroperates to temporarily prevent subsequent conflicting requests to thememory for a period of time sufficient to allow the atomicread-correct-write operation to effectively complete.
 3. The apparatusof claim 1, further comprising: an error detector, operatively coupledto receive the read-refresh result data from the memory-chip interfaceand configured to detect one or more bit errors in the read-refreshresult data from an error-affected location; and an atomicread-correct-write (ARCW) controller operatively coupled to the errordetector and configured, based on detection of an error by the errordetector, to control an atomic read-correct-write operation to correctthe detected error in a manner that is uninterrupted by other requeststo the affected location.
 4. The apparatus of claim 1, furthercomprising: a memory-request buffer, operatively coupled to thememory-chip interface, and configured to hold a plurality of pendingmemory requests that are transmitted to the memory-chip interface. 5.The apparatus of claim 1, further comprising: a memory-request buffer,operatively coupled to the memory-chip interface, and configured to holda plurality of pending memory requests that are transmitted to thememory-chip interface, wherein the refresh controller is furtherconfigured to send explicit-refresh requests to the memory-requestbuffer, and wherein the explicit-refresh requests are sent from thememory-chip interface to cause memory parts to perform an internallycontrolled refresh function.
 6. The apparatus of claim 1, furthercomprising: a memory-request buffer, operatively coupled to thememory-chip interface, and configured to hold a plurality of pendingmemory requests that are transmitted to the memory-chip interface,wherein the refresh controller is further configured to sendexplicit-refresh requests to the memory-request buffer, wherein theexplicit-refresh requests are sent from the memory-chip interface tocause memory parts to perform an internally controlled refresh function,and wherein the refresh controller further includes a timer controllerthat allows a time period between explicit-refresh requests to bevaried.
 7. The apparatus of claim 1, further comprising: amemory-request buffer, operatively coupled to the memory-chip interface,and configured to hold a plurality of pending memory requests that aretransmitted to the memory-chip interface, wherein the refresh controlleris further configured to send explicit-refresh requests to thememory-request buffer, wherein the explicit-refresh requests are sentfrom the memory-chip interface to cause memory parts to perform aninternally controlled refresh function, and wherein the refreshcontroller further includes a priority controller that sends a firstread-refresh request at an initial priority value, and later if thefirst read-refresh request has not been initiated, increases thepriority value.
 8. The apparatus of claim 1, further comprising: ahigh-speed serial external interface operatively connected to receiveand buffer a plurality of memory-requests from a processor for sendingto the memory-chip interface, and to transmit read data obtained fromthe memory-chip interface to the processor.
 9. The apparatus of claim 1,further comprising: a memory-request buffer, operatively coupled to thememory-chip interface, and configured to hold a plurality of pendingmemory requests that are transmitted to the memory-chip interface; andan arbitration circuit having one or more inputs operatively coupled tothe memory-request buffer to receive output of the memory-requestbuffer, wherein refresh requests are presented to one or more inputs ofthe arbitration circuit without passing through the memory-requestbuffer such that the arbitration circuit can choose such a refreshrequest over other requests in the memory-request buffer when therefresh request has a higher priority.
 10. The apparatus of claim 1,further comprising: a memory card that includes: the first memorycontroller; a second memory controller substantially the same as thefirst memory controller; a plurality of high-speed serial externalinterfaces operatively coupled to the first memory controller and thesecond memory controller; a first plurality of memory chips operativelycoupled to the first memory controller; a second plurality of memorychips operatively coupled to the second memory controller; and acrossbar switch operatively coupled to transmit and receive memorycommands and data to and from the first and second memory controllers,and to and from the plurality of high-speed serial external interfaces.11. The apparatus of claim 1, further comprising: a first memory cardthat includes: the first memory controller, a second memory controllersubstantially the same as the first memory controller; a plurality ofhigh-speed serial external interfaces operatively coupled to the firstmemory controller and the second memory controller, a first plurality ofmemory chips operatively coupled to the first memory controller, asecond plurality of memory chips operatively coupled to the secondmemory controller, and a crossbar switch operatively coupled to transmitand receive memory commands and data to and from the first and secondmemory controllers, and to and from the plurality of high-speed serialexternal interfaces; a second memory card substantially the same as thefirst memory card; a plurality of processors each operatively coupled tothe plurality of high-speed serial external interfaces on the firstmemory card and to the plurality of high-speed serial externalinterfaces on the second memory card; a power supply system thatsupplies power to the plurality of processors; a plurality of diskstorage devices; and an input/output system that is operatively coupledbetween the plurality of processors and the plurality of disk storagedevices and that provides data input and output between the plurality ofprocessors and the plurality of disk storage devices.
 12. Aninformation-processing method comprising: sending a stream of processormemory requests to memory locations of at least one memory chip, whereinthe stream of processor memory requests includes a plurality of readrequests and a plurality of write requests; periodically inserting atleast one of a plurality of read-refresh requests into the stream ofprocessor memory requests, wherein the plurality of read-refreshrequests use refresh addresses that cycle through address-bitcombinations to access all rows of the at least one memory chip within arefresh-rate requirement of the at least one memory chip, and that alsocycle through address-bit combinations for all columns for each row; andfetching read-refresh result data as a result of each of theread-refresh requests.
 13. The method of claim 12, further comprising:detecting an error in the fetched read-refresh result data; preventingalready-pending buffered memory requests from starting for a period oftime; preventing further memory requests from being accepted for aperiod of time; and performing an atomic read-correct-write (ARCW)operation, based on detecting the error in the fetched read-refreshresult data, to correct the detected error in a manner that isuninterrupted by other memory requests, wherein the detecting of theerror includes detecting a single-bit error in the fetched read-refreshresult data based on a single-error-correct/double-error-detecterror-correction code (SECDED ECC).
 14. The method of claim 12, furthercomprising: detecting an error in the fetched read-refresh result data;preventing already-pending buffered memory requests from starting for aperiod of time; preventing further memory requests from being acceptedfor a period of time; and performing an atomic read-correct-write (ARCW)operation, based on detecting the error in the fetched read-refreshresult data, to correct the detected error in a manner that isuninterrupted by other memory requests.
 15. The method of claim 12,further comprising: initially fetching processor-requested data from afirst location as a result of one of the processor memory requests;detecting an error in the fetched processor-requested data; preventingothers of already pending buffered memory requests from starting for aperiod of time; preventing further memory requests from being acceptedfor a period of time; and performing an atomic read-correct-write (ARCW)operation based on detecting the error, including again fetching datafrom the first location, in order to correct the detected error in amanner that is uninterrupted by other memory requests.
 16. The method ofclaim 12, further comprising: initially fetching processor-requesteddata from a first location as a result of one of the processor memoryrequests; detecting an error in the fetched processor-requested data;preventing others of already pending buffered memory requests fromstarting for a period of time; preventing further memory requests frombeing accepted for a period of time; performing an atomicread-correct-write (ARCW) operation based on detecting the error,including again fetching data from the first location, in order tocorrect the detected error in a manner that is uninterrupted by othermemory requests; correcting the detected error in the fetchedprocessor-requested data based on a SECDED ECC; and sending thecorrected fetched processor-requested data to the processor thatrequested the data.
 17. The method of claim 12, further comprising:detecting an error in the fetched read-refresh result data; andperforming an atomic read-correct-write (ARCW) operation, based ondetecting the error in the fetched read-refresh result data, in order tocorrect the detected error in a manner that is uninterrupted by othermemory requests.
 18. The method of claim 12, further comprising:inserting an explicit-refresh request periodically into the stream ofmemory requests to cause memory parts to perform an internallycontrolled refresh function; and varying a value of time betweenexplicit-refresh requests.
 19. The method of claim 12, furthercomprising: receiving a plurality of processor requests from a pluralityof processors to form the stream of processor requests; sending readdata to the plurality of processors as a result of the plurality of readrequests; and communicating data between the plurality of processors anda plurality of disk storage devices.
 20. An information-processingsystem comprising: a first memory controller that includes: means forsending a stream of processor memory requests to memory locations of atleast one memory chip, wherein the stream of processor memory requestsincludes a plurality of read requests and a plurality of write requests;means for periodically inserting at least one of a plurality ofread-refresh requests into the stream of processor memory requests,wherein the plurality of read-refresh requests use refresh addressesthat cycle through address-bit combinations to access all rows of the atleast one memory chip within a refresh-rate requirement of the at leastone memory chip, and that also cycle through address-bit combinationsfor all columns for each row; and means for fetching read-refresh resultdata as a result of each of the read-refresh requests.
 21. The apparatusof claim 20, further comprising: a first memory card that includes: thefirst memory controller, a second memory controller substantially thesame as the first memory controller; a plurality of high-speed serialexternal interfaces operatively coupled to the first memory controllerand the second memory controller, a first plurality of memory chipsoperatively coupled to the first memory controller, a second pluralityof memory chips operatively coupled to the second memory controller, anda crossbar switch operatively coupled to transmit and receive memorycommands and data to and from the first and second memory controllers,and to and from the plurality of high-speed serial external interfaces;a second memory card substantially the same as the first memory card; aplurality of processors each operatively coupled to the plurality ofhigh-speed serial external interfaces on the first memory card and tothe plurality of high-speed serial external interfaces on the secondmemory card; a power supply system that supplies power to the pluralityof processors; a plurality of disk storage devices; and an input/outputsystem that is operatively coupled between the plurality of processorsand the plurality of disk storage devices and that provides data inputand output between the plurality of processors and the plurality of diskstorage devices.